summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-12-21 14:17:30 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-12-21 14:17:55 +0100
commit87323a78c0630772f47e35953ade7581e4dd028a (patch)
tree0a31282e7d8b56c777521e40576cd83e581e9337
parentae37434866ccfd12c9e283f64ce750830332797e (diff)
-bus/adam/exp, adamnet, bus/coleco, bus/crvision: Removed MCFG macros. [Ryan Holtz]
-sound/es1373, gaelco, mea8000, rf5c68, sn76496, st0016: Removed MCFG macros. [Ryan Holtz] -drivers/adam, coleco, crvision, fmtowns, gaelco2, spcforce, machine/st0016: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-rw-r--r--src/devices/bus/adam/exp.h27
-rw-r--r--src/devices/bus/adamnet/adamnet.h12
-rw-r--r--src/devices/bus/coleco/ctrl.h28
-rw-r--r--src/devices/bus/coleco/exp.h23
-rw-r--r--src/devices/bus/crvision/slot.h23
-rw-r--r--src/devices/sound/2612intf.h1
-rw-r--r--src/devices/sound/es1373.h4
-rw-r--r--src/devices/sound/gaelco.h16
-rw-r--r--src/devices/sound/mea8000.h10
-rw-r--r--src/devices/sound/rf5c68.h17
-rw-r--r--src/devices/sound/sn76496.h7
-rw-r--r--src/devices/sound/st0016.h9
-rw-r--r--src/mame/drivers/adam.cpp86
-rw-r--r--src/mame/drivers/coleco.cpp32
-rw-r--r--src/mame/drivers/crvision.cpp84
-rw-r--r--src/mame/drivers/fmtowns.cpp182
-rw-r--r--src/mame/drivers/gaelco2.cpp453
-rw-r--r--src/mame/drivers/spcforce.cpp58
-rw-r--r--src/mame/includes/crvision.h2
-rw-r--r--src/mame/includes/fmtowns.h2
-rw-r--r--src/mame/includes/gaelco2.h12
-rw-r--r--src/mame/includes/spcforce.h8
-rw-r--r--src/mame/machine/st0016.cpp16
23 files changed, 541 insertions, 571 deletions
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index 7751c0f4c64..063d28b4271 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -22,22 +22,6 @@
#define ADAM_CENTER_EXPANSION_SLOT_TAG "slot2"
#define ADAM_RIGHT_EXPANSION_SLOT_TAG "slot3"
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ADAM_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, ADAM_EXPANSION_SLOT, _clock) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(_write) \
- downcast<adam_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -52,10 +36,19 @@ class adam_expansion_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ adam_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
+ : adam_expansion_slot_device(mconfig, tag, owner, clock)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~adam_expansion_slot_device() { }
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_write_irq.bind(); }
// computer interface
uint8_t bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2);
diff --git a/src/devices/bus/adamnet/adamnet.h b/src/devices/bus/adamnet/adamnet.h
index b95fca7585d..c9090bf5482 100644
--- a/src/devices/bus/adamnet/adamnet.h
+++ b/src/devices/bus/adamnet/adamnet.h
@@ -26,9 +26,6 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_ADAMNET_BUS_ADD() \
- MCFG_DEVICE_ADD(ADAMNET_TAG, ADAMNET, 0)
-
#define MCFG_ADAMNET_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, ADAMNET_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
@@ -92,6 +89,15 @@ class adamnet_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ adamnet_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : adamnet_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
diff --git a/src/devices/bus/coleco/ctrl.h b/src/devices/bus/coleco/ctrl.h
index b36c256067b..3460dec0b7d 100644
--- a/src/devices/bus/coleco/ctrl.h
+++ b/src/devices/bus/coleco/ctrl.h
@@ -14,23 +14,6 @@
#pragma once
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_COLECOVISION_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, COLECOVISION_CONTROL_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(_write) \
- downcast<colecovision_control_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -65,10 +48,19 @@ class colecovision_control_port_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ colecovision_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : colecovision_control_port_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_write_irq.bind(); }
// computer interface
uint8_t read() { uint8_t data = 0xff; if (exists()) data = m_device->joy_r(); return data; }
diff --git a/src/devices/bus/coleco/exp.h b/src/devices/bus/coleco/exp.h
index e722dfc1234..a4bf724c6e7 100644
--- a/src/devices/bus/coleco/exp.h
+++ b/src/devices/bus/coleco/exp.h
@@ -39,18 +39,6 @@
#define COLECOVISION_CARTRIDGE_SLOT_TAG "cartslot"
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, COLECOVISION_CARTRIDGE_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -65,6 +53,15 @@ class colecovision_cartridge_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ colecovision_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : colecovision_cartridge_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// computer interface
@@ -116,11 +113,9 @@ protected:
colecovision_cartridge_slot_device *m_slot;
};
-
// device type definition
DECLARE_DEVICE_TYPE(COLECOVISION_CARTRIDGE_SLOT, colecovision_cartridge_slot_device)
void colecovision_cartridges(device_slot_interface &device);
-
#endif // MAME_BUS_COLECO_EXP_H
diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h
index f6fcabba4ce..0dff9f8636f 100644
--- a/src/devices/bus/crvision/slot.h
+++ b/src/devices/bus/crvision/slot.h
@@ -12,6 +12,7 @@
TYPE DEFINITIONS
***************************************************************************/
+#define CRVSLOT_ROM_REGION_TAG ":cart:rom"
/* PCB */
enum
@@ -59,6 +60,15 @@ class crvision_cart_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ crvision_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : crvision_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
crvision_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~crvision_cart_slot_device();
@@ -94,20 +104,7 @@ protected:
device_crvision_cart_interface* m_cart;
};
-
-
// device type definition
DECLARE_DEVICE_TYPE(CRVISION_CART_SLOT, crvision_cart_slot_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
- ***************************************************************************/
-
-#define CRVSLOT_ROM_REGION_TAG ":cart:rom"
-
-#define MCFG_CRVISION_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, CRVISION_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#endif // MAME_BUS_CRVISION_SLOT_H
diff --git a/src/devices/sound/2612intf.h b/src/devices/sound/2612intf.h
index 22938d7aec0..63f6ee22ec0 100644
--- a/src/devices/sound/2612intf.h
+++ b/src/devices/sound/2612intf.h
@@ -16,6 +16,7 @@ public:
// configuration helpers
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ auto irq_handler() { return m_irq_handler.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/sound/es1373.h b/src/devices/sound/es1373.h
index db3ea72b192..2a796ffe6c8 100644
--- a/src/devices/sound/es1373.h
+++ b/src/devices/sound/es1373.h
@@ -8,9 +8,6 @@
#include "machine/pci.h"
-#define MCFG_ES1373_IRQ_HANDLER(cb) \
- downcast<es1373_device &>(*device).set_irq_handler(DEVCB_##cb);
-
class es1373_device : public pci_device, public device_sound_interface
{
public:
@@ -19,7 +16,6 @@ public:
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
- template <typename T> devcb_base &set_irq_handler(T &&cb) { return m_irq_handler.set_callback(std::forward<T>(cb)); }
auto irq_handler() { return m_irq_handler.bind(); }
DECLARE_READ32_MEMBER (reg_r);
diff --git a/src/devices/sound/gaelco.h b/src/devices/sound/gaelco.h
index f670eaf0c70..01fcae1c8dc 100644
--- a/src/devices/sound/gaelco.h
+++ b/src/devices/sound/gaelco.h
@@ -7,28 +7,16 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_GAELCO_SND_DATA(_tag) \
- downcast<gaelco_gae1_device &>(*device).set_snd_data_tag(_tag);
-
-#define MCFG_GAELCO_BANKS(_offs1, _offs2, _offs3, _offs4) \
- downcast<gaelco_gae1_device &>(*device).set_bank_offsets(_offs1, _offs2, _offs3, _offs4);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
-
// ======================> gaelco_gae1_device
class gaelco_gae1_device : public device_t,
public device_sound_interface
{
public:
- gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
void set_snd_data_tag(const char *tag) { m_snd_data.set_tag(tag); }
void set_bank_offsets(int offs1, int offs2, int offs3, int offs4)
@@ -83,7 +71,7 @@ DECLARE_DEVICE_TYPE(GAELCO_GAE1, gaelco_gae1_device)
class gaelco_cg1v_device : public gaelco_gae1_device
{
public:
- gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};
DECLARE_DEVICE_TYPE(GAELCO_CG1V, gaelco_cg1v_device)
diff --git a/src/devices/sound/mea8000.h b/src/devices/sound/mea8000.h
index 21764e75b88..23cebceade9 100644
--- a/src/devices/sound/mea8000.h
+++ b/src/devices/sound/mea8000.h
@@ -13,19 +13,15 @@
#pragma once
-#define MCFG_MEA8000_REQ_CALLBACK(_write) \
- downcast<mea8000_device &>(*device).set_reqwr_callback(*device, DEVCB_##_write);
-
/* define to use double instead of int (slow but useful for debugging) */
#undef MEA8000_FLOAT_MODE
-
class mea8000_device : public device_t, public device_sound_interface
{
public:
mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_req_wr_callback(Object &&cb) { return m_write_req.set_callback(std::forward<Object>(cb)); }
+ auto req() { return m_write_req.bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -46,7 +42,7 @@ private:
enum class mea8000_state : u8
{
STOPPED, /* nothing to do, timer disabled */
- WAIT_FIRST, /* received pitch, wait for first full trame, timer disabled */
+ WAIT_FIRST, /* received pitch, wait for first full frame, timer disabled */
STARTED, /* playing a frame, timer on */
SLOWING /* repeating last frame with decreasing amplitude, timer on */
};
@@ -55,7 +51,7 @@ private:
{
#ifdef MEA8000_FLOAT_MODE
double fm, last_fm; /* frequency, in Hz */
- double bw, last_bw; /* band-width, in Hz */
+ double bw, last_bw; /* bandwidth, in Hz */
double output, last_output; /* filter state */
#else
uint16_t fm, last_fm;
diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h
index 5594e32f3e8..056d2c9c99c 100644
--- a/src/devices/sound/rf5c68.h
+++ b/src/devices/sound/rf5c68.h
@@ -11,13 +11,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_RF5C68_SAMPLE_END_CB(_class, _method) \
- downcast<rf5c68_device &>(*device).set_end_callback(rf5c68_device::sample_end_cb_delegate(&_class::_method, #_class "::" #_method, this));
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -35,7 +28,15 @@ public:
rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <typename Object> void set_end_callback(Object &&cb) { m_sample_end_cb = std::forward<Object>(cb); }
+ void set_end_callback(sample_end_cb_delegate callback) { m_sample_end_cb = callback; }
+ template <class FunctionClass> void set_end_callback(const char *devname, void (FunctionClass::*callback)(int), const char *name)
+ {
+ set_end_callback(sample_end_cb_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_end_callback(void (FunctionClass::*callback)(int), const char *name)
+ {
+ set_end_callback(sample_end_cb_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
DECLARE_READ8_MEMBER( rf5c68_r );
DECLARE_WRITE8_MEMBER( rf5c68_w );
diff --git a/src/devices/sound/sn76496.h b/src/devices/sound/sn76496.h
index 741b6b0bcd7..b518fa25398 100644
--- a/src/devices/sound/sn76496.h
+++ b/src/devices/sound/sn76496.h
@@ -19,20 +19,15 @@ DECLARE_DEVICE_TYPE(GAMEGEAR, gamegear_device)
DECLARE_DEVICE_TYPE(SEGAPSG, segapsg_device)
-#define MCFG_SN76496_READY_HANDLER(cb) \
- downcast<sn76496_base_device &>(*device).set_ready_handler((DEVCB_##cb));
-
class sn76496_base_device : public device_t, public device_sound_interface
{
public:
- // configuration helpers
- template <class Object> devcb_base &set_ready_handler(Object &&cb) { return m_ready_handler.set_callback(std::forward<Object>(cb)); }
+ auto ready_cb() { return m_ready_handler.bind(); }
DECLARE_WRITE8_MEMBER( stereo_w );
void write(uint8_t data);
DECLARE_WRITE8_MEMBER( command_w ) { write(data); }
DECLARE_READ_LINE_MEMBER( ready_r ) { return m_ready_state ? 1 : 0; }
- auto ready_cb() { return m_ready_handler.bind(); }
protected:
sn76496_base_device(
diff --git a/src/devices/sound/st0016.h b/src/devices/sound/st0016.h
index 54da6678020..9de0065538b 100644
--- a/src/devices/sound/st0016.h
+++ b/src/devices/sound/st0016.h
@@ -7,13 +7,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ST0016_SOUNDRAM_READ_CB(_devcb) \
- downcast<st0016_device &>(*device).set_soundram_callback(DEVCB_##_devcb);
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -24,7 +17,7 @@ class st0016_device : public device_t, public device_sound_interface
public:
st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_soundram_callback(Object &&cb) { return m_ram_read_cb.set_callback(std::forward<Object>(cb)); }
+ auto ram_read() { return m_ram_read_cb.bind(); }
DECLARE_READ8_MEMBER( st0016_snd_r );
DECLARE_WRITE8_MEMBER( st0016_snd_w );
diff --git a/src/mame/drivers/adam.cpp b/src/mame/drivers/adam.cpp
index 74088dcbec4..6d1a69c2db5 100644
--- a/src/mame/drivers/adam.cpp
+++ b/src/mame/drivers/adam.cpp
@@ -1023,14 +1023,15 @@ DEVICE_INPUT_DEFAULTS_END
//-------------------------------------------------
-// MACHINE_CONFIG( adam )
+// adam machine configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(adam_state::adam)
+void adam_state::adam(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(7'159'090)/2)
- MCFG_DEVICE_PROGRAM_MAP(adam_mem)
- MCFG_DEVICE_IO_MAP(adam_io)
+ Z80(config, m_maincpu, XTAL(7'159'090)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &adam_state::adam_mem);
+ m_maincpu->set_addrmap(AS_IO, &adam_state::adam_io);
M6801(config, m_netcpu, XTAL(4'000'000));
m_netcpu->set_addrmap(AS_PROGRAM, &adam_state::m6801_mem);
@@ -1051,51 +1052,50 @@ MACHINE_CONFIG_START(adam_state::adam)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489A_TAG, SN76489A, XTAL(7'159'090)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, m_psg, XTAL(7'159'090)/2);
+ m_psg->add_route(ALL_OUTPUTS, "mono", 1.00);
// TODO: enable when Z80 has better WAIT pin emulation
- //MCFG_SN76496_READY_HANDLER(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) MCFG_DEVCB_INVERT
+ //m_psg->ready_cb().set_inputline(m_maincpu, Z80_INPUT_LINE_WAIT).invert();
// devices
- MCFG_ADAMNET_BUS_ADD()
- MCFG_ADAMNET_SLOT_ADD("net1", adamnet_devices, "kb")
- MCFG_ADAMNET_SLOT_ADD("net2", adamnet_devices, "prn")
- MCFG_ADAMNET_SLOT_ADD("net3", adamnet_devices, "ddp")
- MCFG_ADAMNET_SLOT_ADD("net4", adamnet_devices, "fdc")
- MCFG_ADAMNET_SLOT_ADD("net5", adamnet_devices, "fdc")
- MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("fdc", drive2)
- MCFG_ADAMNET_SLOT_ADD("net6", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net7", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net8", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net9", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net10", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net11", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net12", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net13", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net14", adamnet_devices, nullptr)
- MCFG_ADAMNET_SLOT_ADD("net15", adamnet_devices, nullptr)
-
- MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, nullptr)
- MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_LEFT_EXPANSION_SLOT_TAG, XTAL(7'159'090)/2, adam_slot1_devices, "adamlink")
- MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_CENTER_EXPANSION_SLOT_TAG, XTAL(7'159'090)/2, adam_slot2_devices, nullptr)
- MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_RIGHT_EXPANSION_SLOT_TAG, XTAL(7'159'090)/2, adam_slot3_devices, "ram")
-
- MCFG_COLECOVISION_CONTROL_PORT_ADD(CONTROL1_TAG, colecovision_control_port_devices, "hand")
- MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(WRITELINE(*this, adam_state, joy1_irq_w))
- MCFG_COLECOVISION_CONTROL_PORT_ADD(CONTROL2_TAG, colecovision_control_port_devices, nullptr)
- MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(WRITELINE(*this, adam_state, joy2_irq_w))
+ ADAMNET(config, ADAMNET_TAG, 0);
+ ADAMNET_SLOT(config, "net1", adamnet_devices, "kb");
+ ADAMNET_SLOT(config, "net2", adamnet_devices, "prn");
+ ADAMNET_SLOT(config, "net3", adamnet_devices, "ddp");
+ ADAMNET_SLOT(config, "net4", adamnet_devices, "fdc");
+ ADAMNET_SLOT(config, "net5", adamnet_devices, "fdc").set_option_device_input_defaults("fdc", device_iptdef_drive2);
+ ADAMNET_SLOT(config, "net6", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net7", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net8", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net9", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net10", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net11", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net12", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net13", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net14", adamnet_devices, nullptr);
+ ADAMNET_SLOT(config, "net15", adamnet_devices, nullptr);
+
+ COLECOVISION_CARTRIDGE_SLOT(config, m_cart, colecovision_cartridges, nullptr);
+ ADAM_EXPANSION_SLOT(config, m_slot1, XTAL(7'159'090)/2, adam_slot1_devices, "adamlink");
+ m_slot1->irq().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ ADAM_EXPANSION_SLOT(config, m_slot2, XTAL(7'159'090)/2, adam_slot2_devices, nullptr);
+ m_slot2->irq().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ ADAM_EXPANSION_SLOT(config, m_slot3, XTAL(7'159'090)/2, adam_slot3_devices, "ram");
+
+ COLECOVISION_CONTROL_PORT(config, m_joy1, colecovision_control_port_devices, "hand");
+ m_joy1->irq().set(FUNC(adam_state::joy1_irq_w));
+ COLECOVISION_CONTROL_PORT(config, m_joy2, colecovision_control_port_devices, nullptr);
+ m_joy2->irq().set(FUNC(adam_state::joy2_irq_w));
// internal ram
- RAM(config, RAM_TAG).set_default_size("64K");
+ RAM(config, m_ram).set_default_size("64K");
// software lists
- MCFG_SOFTWARE_LIST_ADD("colec_cart_list", "coleco")
- MCFG_SOFTWARE_LIST_ADD("adam_cart_list", "adam_cart")
- MCFG_SOFTWARE_LIST_ADD("cass_list", "adam_cass")
- MCFG_SOFTWARE_LIST_ADD("flop_list", "adam_flop")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "colec_cart_list").set_original("coleco");
+ SOFTWARE_LIST(config, "adam_cart_list").set_original("adam_cart");
+ SOFTWARE_LIST(config, "cass_list").set_original("adam_cass");
+ SOFTWARE_LIST(config, "flop_list").set_original("adam_flop");
+}
diff --git a/src/mame/drivers/coleco.cpp b/src/mame/drivers/coleco.cpp
index d4ac205ec16..c554f43ea91 100644
--- a/src/mame/drivers/coleco.cpp
+++ b/src/mame/drivers/coleco.cpp
@@ -374,12 +374,12 @@ void coleco_state::machine_reset()
/* Machine Drivers */
-MACHINE_CONFIG_START(coleco_state::coleco)
-
+void coleco_state::coleco(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(7'159'090)/2) // 3.579545 MHz
- MCFG_DEVICE_PROGRAM_MAP(coleco_map)
- MCFG_DEVICE_IO_MAP(coleco_io_map)
+ Z80(config, m_maincpu, XTAL(7'159'090)/2); // 3.579545 MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &coleco_state::coleco_map);
+ m_maincpu->set_addrmap(AS_IO, &coleco_state::coleco_io_map);
/* video hardware */
tms9928a_device &vdp(TMS9928A(config, "tms9928a", XTAL(10'738'635)));
@@ -390,19 +390,19 @@ MACHINE_CONFIG_START(coleco_state::coleco)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn76489a", SN76489A, XTAL(7'159'090)/2) // 3.579545 MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ sn76489a_device &psg(SN76489A(config, "sn76489a", XTAL(7'159'090)/2)); // 3.579545 MHz
+ psg.add_route(ALL_OUTPUTS, "mono", 1.00);
// TODO: enable when Z80 has better WAIT pin emulation, this currently breaks pitfall2 for example
- //MCFG_SN76496_READY_HANDLER(INPUTLINE("maincpu", Z80_INPUT_LINE_WAIT)) MCFG_DEVCB_INVERT
+ //psg.ready_cb().set_inputline("maincpu", Z80_INPUT_LINE_WAIT).invert();
/* cartridge */
- MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, nullptr)
+ COLECOVISION_CARTRIDGE_SLOT(config, m_cart, colecovision_cartridges, nullptr);
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list","coleco")
+ SOFTWARE_LIST(config, "cart_list").set_original("coleco");
- MCFG_TIMER_DRIVER_ADD_PERIODIC("paddle_timer", coleco_state, paddle_update_callback, attotime::from_msec(20))
-MACHINE_CONFIG_END
+ TIMER(config, "paddle_timer").configure_periodic(FUNC(coleco_state::paddle_update_callback), attotime::from_msec(20));
+}
void coleco_state::colecop(machine_config &config)
{
@@ -415,13 +415,13 @@ void coleco_state::colecop(machine_config &config)
vdp.int_callback().set(FUNC(coleco_state::coleco_vdp_interrupt));
}
-MACHINE_CONFIG_START(coleco_state::czz50)
+void coleco_state::czz50(machine_config &config)
+{
coleco(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu") // note: cpu speed unverified, assume it's the same as ColecoVision
- MCFG_DEVICE_PROGRAM_MAP(czz50_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &coleco_state::czz50_map); // note: cpu speed unverified, assume it's the same as ColecoVision
+}
void coleco_state::dina(machine_config &config)
{
diff --git a/src/mame/drivers/crvision.cpp b/src/mame/drivers/crvision.cpp
index 13264a27afb..172241241ee 100644
--- a/src/mame/drivers/crvision.cpp
+++ b/src/mame/drivers/crvision.cpp
@@ -734,13 +734,14 @@ static void crvision_cart(device_slot_interface &device)
}
/*-------------------------------------------------
- MACHINE_CONFIG_START( creativision )
+ creativision machine configuration
-------------------------------------------------*/
-MACHINE_CONFIG_START(crvision_state::creativision)
+void crvision_state::creativision(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(M6502_TAG, M6502, XTAL(2'000'000))
- MCFG_DEVICE_PROGRAM_MAP(crvision_map)
+ M6502(config, m_maincpu, XTAL(2'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &crvision_state::crvision_map);
// devices
PIA6821(config, m_pia, 0);
@@ -749,38 +750,38 @@ MACHINE_CONFIG_START(crvision_state::creativision)
m_pia->writepa_handler().set(FUNC(crvision_state::pia_pa_w));
m_pia->writepb_handler().set(SN76489_TAG, FUNC(sn76496_base_device::command_w));
- 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));
- MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, "cent_status_in", 0);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
- MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0)
- MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_strobe))
+ OUTPUT_LATCH(config, "cent_ctrl_out").bit_handler<4>().set(m_centronics, FUNC(centronics_device::write_strobe));
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489_TAG, SN76489A, XTAL(2'000'000))
- MCFG_SN76496_READY_HANDLER(WRITELINE(PIA6821_TAG, pia6821_device, cb1_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, m_psg, XTAL(2'000'000));
+ m_psg->ready_cb().set(m_pia, FUNC(pia6821_device::cb1_w));
+ m_psg->add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(1, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(1, "mono", 0.25);
// cartridge
- MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, nullptr)
+ CRVISION_CART_SLOT(config, m_cart, crvision_cart, nullptr);
// internal ram
- RAM(config, RAM_TAG)
- .set_default_size("1K") // MAIN RAM
- .set_extra_options("15K"); // 16K expansion (lower 14K available only, upper 2K shared with BIOS ROM)
+ RAM(config, m_ram);
+ m_ram->set_default_size("1K"); // main RAM
+ m_ram->set_extra_options("15K"); // 16K expansion (lower 14K available only, upper 2K shared with BIOS ROM)
// software lists
- MCFG_SOFTWARE_LIST_ADD("cart_list", "crvision")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "cart_list").set_original("crvision");
+}
/*-------------------------------------------------
MACHINE_CONFIG_START( ntsc )
@@ -816,10 +817,11 @@ void crvision_pal_state::pal(machine_config &config)
MACHINE_CONFIG_START( lasr2001 )
-------------------------------------------------*/
-MACHINE_CONFIG_START(laser2001_state::lasr2001)
+void laser2001_state::lasr2001(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(M6502_TAG, M6502, XTAL(17'734'470)/9)
- MCFG_DEVICE_PROGRAM_MAP(lasr2001_map)
+ M6502(config, m_maincpu, XTAL(17'734'470)/9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &laser2001_state::lasr2001_map);
// devices
PIA6821(config, m_pia, 0);
@@ -831,13 +833,14 @@ MACHINE_CONFIG_START(laser2001_state::lasr2001)
m_pia->ca2_handler().set(FUNC(laser2001_state::pia_ca2_w));
m_pia->cb2_handler().set(FUNC(laser2001_state::pia_cb2_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));
- MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, laser2001_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(laser2001_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
// video hardware
tms9929a_device &vdp(TMS9929A(config, TMS9929_TAG, XTAL(10'738'635)));
@@ -848,23 +851,24 @@ MACHINE_CONFIG_START(laser2001_state::lasr2001)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489_TAG, SN76489A, XTAL(17'734'470)/9)
- MCFG_SN76496_READY_HANDLER(WRITELINE(*this, laser2001_state, write_psg_ready))
+ SN76489A(config, m_psg, XTAL(17'734'470)/9);
+ m_psg->ready_cb().set(FUNC(laser2001_state::write_psg_ready));
+ m_psg->add_route(ALL_OUTPUTS, "mono", 1.00);
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-
- WAVE(config, "wave", "cassette").add_route(1, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(1, "mono", 0.25);
// cartridge
- MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, nullptr)
+ CRVISION_CART_SLOT(config, m_cart, crvision_cart, nullptr);
// internal ram
- RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("32K");
+ RAM(config, m_ram);
+ m_ram->set_default_size("16K");
+ m_ram->set_extra_options("32K");
// software list
- MCFG_SOFTWARE_LIST_ADD("cart_list","crvision")
- MCFG_SOFTWARE_LIST_ADD("cart_list2","laser2001_cart")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "cart_list").set_original("crvision");
+ SOFTWARE_LIST(config, "cart_list2").set_original("laser2001_cart");
+}
/***************************************************************************
ROMS
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 7399de30841..14f749c0548 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -2751,45 +2751,49 @@ static GFXDECODE_START( gfx_towns )
GFXDECODE_ENTRY( "user", 0x180000, fnt_chars_16x16, 0, 16 )
GFXDECODE_END
-MACHINE_CONFIG_START(towns_state::towns_base)
+void towns_state::towns_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I386, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(towns_mem)
- MCFG_DEVICE_IO_MAP(towns_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I386(config, m_maincpu, 16000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem);
+ m_maincpu->set_addrmap(AS_IO, &towns_state::towns_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
//MCFG_MACHINE_RESET_OVERRIDE(towns_state,towns)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(768,512)
- MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 512-1)
- MCFG_SCREEN_UPDATE_DRIVER(towns_state, screen_update)
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette16_0", gfx_towns)
- MCFG_PALETTE_ADD("palette256", 256)
- MCFG_PALETTE_ADD("palette16_0", 16)
- MCFG_PALETTE_ADD("palette16_1", 16)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(768,512);
+ m_screen->set_visarea(0, 768-1, 0, 512-1);
+ m_screen->set_screen_update(FUNC(towns_state::screen_update));
+
+ GFXDECODE(config, "gfxdecode", m_palette16[0], gfx_towns);
+ PALETTE(config, m_palette, 256);
+ PALETTE(config, m_palette16[0], 16);
+ PALETTE(config, m_palette16[1], 16);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("fm", YM3438, 16000000 / 2) // actual clock speed unknown
- MCFG_YM2612_IRQ_HANDLER(WRITELINE(*this, towns_state, towns_fm_irq))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
-
- MCFG_DEVICE_ADD("pcm", RF5C68, 16000000 / 2) // actual clock speed unknown
- MCFG_RF5C68_SAMPLE_END_CB(towns_state, towns_pcm_irq)
- MCFG_DEVICE_ADDRESS_MAP(0, pcm_mem)
- MCFG_SOUND_ROUTE(0, "lspeaker", 3.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 3.00)
- MCFG_DEVICE_ADD("cdda",CDDA)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "lspeaker", 0.50).add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+ ym3438_device &fm(YM3438(config, "fm", 16000000 / 2)); // actual clock speed unknown
+ fm.irq_handler().set(FUNC(towns_state::towns_fm_irq));
+ fm.add_route(0, "lspeaker", 1.00);
+ fm.add_route(1, "rspeaker", 1.00);
+
+ rf5c68_device &pcm(RF5C68(config, "pcm", 16000000 / 2)); // actual clock speed unknown
+ pcm.set_end_callback(FUNC(towns_state::towns_pcm_irq));
+ pcm.set_addrmap(0, &towns_state::pcm_mem);
+ pcm.add_route(0, "lspeaker", 3.00);
+ pcm.add_route(1, "rspeaker", 3.00);
+
+ CDDA(config, m_cdda);
+ m_cdda->add_route(0, "lspeaker", 1.00);
+ m_cdda->add_route(1, "rspeaker", 1.00);
+ SPEAKER_SOUND(config, m_speaker);
+ m_speaker->add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ m_speaker->add_route(ALL_OUTPUTS, "rspeaker", 0.50);
PIT8253(config, m_pit, 0);
m_pit->set_clk<0>(307200);
@@ -2817,20 +2821,19 @@ MACHINE_CONFIG_START(towns_state::towns_base)
MB8877(config, m_fdc, 8'000'000 / 4); // clock unknown
m_fdc->intrq_wr_callback().set(FUNC(towns_state::mb8877a_irq_w));
m_fdc->drq_wr_callback().set(FUNC(towns_state::mb8877a_drq_w));
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", towns_floppies, "35hd", towns_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", towns_floppies, "35hd", towns_state::floppy_formats)
- MCFG_SOFTWARE_LIST_ADD("fd_list","fmtowns_flop")
+ FLOPPY_CONNECTOR(config, m_flop[0], towns_floppies, "35hd", towns_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, m_flop[1], towns_floppies, "35hd", towns_state::floppy_formats);
+ SOFTWARE_LIST(config, "fd_list").set_original("fmtowns_flop");
- MCFG_CDROM_ADD("cdrom")
- MCFG_CDROM_INTERFACE("fmt_cdrom")
- MCFG_SOFTWARE_LIST_ADD("cd_list","fmtowns_cd")
+ CDROM(config, m_cdrom, 0).set_interface("fmt_cdrom");
+ SOFTWARE_LIST(config, "cd_list").set_original("fmtowns_cd");
- MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
- MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_0)
- MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE2, "harddisk", SCSIHD, SCSI_ID_1)
- MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE3, "harddisk", SCSIHD, SCSI_ID_2)
- MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE4, "harddisk", SCSIHD, SCSI_ID_3)
- MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE5, "harddisk", SCSIHD, SCSI_ID_4)
+ scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0));
+ scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0));
+ scsi.set_slot_device(2, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1));
+ scsi.set_slot_device(3, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_2));
+ scsi.set_slot_device(4, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3));
+ scsi.set_slot_device(5, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4));
FMSCSI(config, m_scsi, 0);
m_scsi->set_scsi_port("scsi");
@@ -2874,15 +2877,15 @@ MACHINE_CONFIG_START(towns_state::towns_base)
/* internal ram */
RAM(config, m_ram).set_default_size("6M").set_extra_options("2M,4M,8M,16M,32M,64M,96M");
- MCFG_DEVICE_ADD("rtc58321", MSM58321, 32768_Hz_XTAL)
- MCFG_MSM58321_D0_HANDLER(WRITELINE(*this, towns_state, rtc_d0_w))
- MCFG_MSM58321_D1_HANDLER(WRITELINE(*this, towns_state, rtc_d1_w))
- MCFG_MSM58321_D2_HANDLER(WRITELINE(*this, towns_state, rtc_d2_w))
- MCFG_MSM58321_D3_HANDLER(WRITELINE(*this, towns_state, rtc_d3_w))
- MCFG_MSM58321_BUSY_HANDLER(WRITELINE(*this, towns_state, rtc_busy_w))
- MCFG_MSM58321_YEAR0(2000)
- MCFG_MSM58321_DEFAULT_24H(true)
-MACHINE_CONFIG_END
+ MSM58321(config, m_rtc, 32768_Hz_XTAL);
+ m_rtc->d0_handler().set(FUNC(towns_state::rtc_d0_w));
+ m_rtc->d1_handler().set(FUNC(towns_state::rtc_d1_w));
+ m_rtc->d2_handler().set(FUNC(towns_state::rtc_d2_w));
+ m_rtc->d3_handler().set(FUNC(towns_state::rtc_d3_w));
+ m_rtc->busy_handler().set(FUNC(towns_state::rtc_busy_w));
+ m_rtc->set_year0(2000);
+ m_rtc->set_default_24h(true);
+}
void towns_state::towns(machine_config &config)
{
@@ -2890,67 +2893,72 @@ void towns_state::towns(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
-MACHINE_CONFIG_START(towns16_state::townsux)
+void towns16_state::townsux(machine_config &config)
+{
towns_base(config);
- MCFG_DEVICE_REPLACE("maincpu",I386SX, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(ux_mem)
- MCFG_DEVICE_IO_MAP(towns16_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I386SX(config.replace(), m_maincpu, 16000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &towns16_state::ux_mem);
+ m_maincpu->set_addrmap(AS_IO, &towns16_state::towns16_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("2M").set_extra_options("10M");
NVRAM(config, "nvram16", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(towns_state::townssj)
+void towns_state::townssj(machine_config &config)
+{
towns(config);
- MCFG_DEVICE_REPLACE("maincpu",PENTIUM, 66000000)
- MCFG_DEVICE_PROGRAM_MAP(towns_mem)
- MCFG_DEVICE_IO_MAP(towns_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ PENTIUM(config.replace(), m_maincpu, 66000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem);
+ m_maincpu->set_addrmap(AS_IO, &towns_state::towns_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("8M").set_extra_options("40M,72M");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(towns_state::townshr)
+void towns_state::townshr(machine_config &config)
+{
towns(config);
- MCFG_DEVICE_REPLACE("maincpu",I486, 20000000)
- MCFG_DEVICE_PROGRAM_MAP(towns_mem)
- MCFG_DEVICE_IO_MAP(towns_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I486(config.replace(), m_maincpu, 20000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem);
+ m_maincpu->set_addrmap(AS_IO, &towns_state::towns_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("4M").set_extra_options("12M,20M,28M");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(towns_state::townsftv)
+void towns_state::townsftv(machine_config &config)
+{
towns(config);
- MCFG_DEVICE_REPLACE("maincpu",I486, 33000000)
- MCFG_DEVICE_PROGRAM_MAP(towns_mem)
- MCFG_DEVICE_IO_MAP(towns_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I486(config.replace(), m_maincpu, 33000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem);
+ m_maincpu->set_addrmap(AS_IO, &towns_state::towns_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("6M").set_extra_options("32M,68M");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(marty_state::marty)
+void marty_state::marty(machine_config &config)
+{
towns_base(config);
- MCFG_DEVICE_REPLACE("maincpu",I386SX, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(marty_mem)
- MCFG_DEVICE_IO_MAP(towns16_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", towns_state, towns_vsync_irq)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I386SX(config.replace(), m_maincpu, 16000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &marty_state::marty_mem);
+ m_maincpu->set_addrmap(AS_IO, &marty_state::towns16_io);
+ m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq));
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("6M");
NVRAM(config, "nvram16", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
/* ROM definitions */
/* It is unknown exactly what model these ROM were dumped from, but it is certainly a newer model, as it won't
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index 45b0f2886fa..eeca65e1fa1 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -178,26 +178,27 @@ static INPUT_PORTS_START( maniacsq )
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-MACHINE_CONFIG_START(gaelco2_state::maniacsq)
+void gaelco2_state::maniacsq(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(26'000'000) / 2) /* 13 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(maniacsq_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(26'000'000) / 2); /* 13 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::maniacsq_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 320-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0080000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -205,18 +206,18 @@ MACHINE_CONFIG_START(gaelco2_state::maniacsq)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0080000, 1 * 0x0080000, 0, 0)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(gaelco2_state::maniacsq_d5002fp)
+void gaelco2_state::maniacsq_d5002fp(machine_config &config)
+{
maniacsq(config);
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(24'000'000) / 2) /* ? */
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
-MACHINE_CONFIG_END
+ GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); // clock unknown
+}
ROM_START( maniacsq ) // REF 940411
@@ -460,26 +461,27 @@ void gaelco2_state::saltcrdi_map(address_map &map)
}
// 34'000'000 XTAL for the video?
-MACHINE_CONFIG_START(gaelco2_state::saltcrdi)
+void gaelco2_state::saltcrdi(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2) /* 12 MHz */
- MCFG_DEVICE_PROGRAM_MAP(saltcrdi_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::saltcrdi_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 384-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0080000) /* gfx_0x0040000 */
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000); /* gfx_0x0040000 */
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -487,12 +489,12 @@ MACHINE_CONFIG_START(gaelco2_state::saltcrdi)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0) /* unused? ROMs contain no sound data */
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0080000, 1 * 0x0080000, 0, 0)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco")); /* unused? ROMs contain no sound data */
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
ROM_START( saltcrdi ) // REF 970410
ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */
@@ -718,29 +720,30 @@ ROM_START( play2000a )
ROM_LOAD( "palce16v8h.u29", 0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) )
ROM_END
-MACHINE_CONFIG_START(gaelco2_state::play2000)
+void gaelco2_state::play2000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(11'059'200)) /* or from the 34MHz? (34MHz drives the CG-1V-149 PLD?) */
- MCFG_DEVICE_PROGRAM_MAP(play2000_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(11'059'200)); /* or from the 34MHz? (34MHz drives the CG-1V-149 PLD?) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::play2000_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
// MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(11'059'200)) /* 11.0592MHz */
// MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 384-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0200000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -748,12 +751,12 @@ MACHINE_CONFIG_START(gaelco2_state::play2000)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000) // ?
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco")); /* unused? ROMs contain no sound data */
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000, 1 * 0x0080000); // ?
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
/*============================================================================
@@ -817,13 +820,14 @@ static INPUT_PORTS_START( bang )
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, -6.0 / 240, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
-MACHINE_CONFIG_START(bang_state::bang)
+void bang_state::bang(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(30'000'000) / 2) /* 15 MHz */
- MCFG_DEVICE_PROGRAM_MAP(bang_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bang_state, bang_irq, "screen", 0, 1)
+ M68000(config, m_maincpu, XTAL(30'000'000) / 2); /* 15 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &bang_state::bang_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(bang_state::bang_irq), "screen", 0, 1);
- EEPROM_93C66_16BIT(config, "eeprom");
+ EEPROM_93C66_16BIT(config, m_eeprom);
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -833,19 +837,19 @@ MACHINE_CONFIG_START(bang_state::bang)
m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 320-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0200000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -853,12 +857,12 @@ MACHINE_CONFIG_START(bang_state::bang)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_CG1V, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0200000, 1 * 0x0200000, 2 * 0x0200000, 3 * 0x0200000)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_cg1v_device &gaelco(GAELCO_CG1V(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0200000, 1 * 0x0200000, 2 * 0x0200000, 3 * 0x0200000);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
/*
@@ -1064,26 +1068,27 @@ static INPUT_PORTS_START( alighunt )
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-MACHINE_CONFIG_START(gaelco2_state::alighunt)
+void gaelco2_state::alighunt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2) /* 12 MHz */
- MCFG_DEVICE_PROGRAM_MAP(alighunt_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::alighunt_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 320-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0400000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1091,18 +1096,18 @@ MACHINE_CONFIG_START(gaelco2_state::alighunt)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0400000, 1 * 0x0400000, 2 * 0x0400000, 3 * 0x0400000)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 2 * 0x0400000, 3 * 0x0400000);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(gaelco2_state::alighunt_d5002fp)
+void gaelco2_state::alighunt_d5002fp(machine_config &config)
+{
alighunt(config);
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(24'000'000) / 2) /* 12 MHz */
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
-MACHINE_CONFIG_END
+ GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 12 MHz */
+}
/*
PCB Layout:
@@ -1363,11 +1368,12 @@ static INPUT_PORTS_START( touchgo )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
INPUT_PORTS_END
-MACHINE_CONFIG_START(gaelco2_state::touchgo)
+void gaelco2_state::touchgo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(32'000'000) / 2) /* 16 MHz */
- MCFG_DEVICE_PROGRAM_MAP(touchgo_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(32'000'000) / 2); /* 16 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::touchgo_map);
+ m_maincpu->set_vblank_int("lscreen", FUNC(gaelco2_state::irq6_line_hold));
LS259(config, m_mainlatch); // IC6
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1376,27 +1382,27 @@ MACHINE_CONFIG_START(gaelco2_state::touchgo)
m_mainlatch->q_out_cb<3>().set(FUNC(gaelco2_state::coin4_counter_w));
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0400000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ BUFFERED_SPRITERAM16(config, m_spriteram);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
config.set_default_layout(layout_dualhsxs);
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2_left)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2_right)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_refresh_hz(59.1);
+ lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ lscreen.set_size(64*16, 32*16);
+ lscreen.set_visarea(0, 480-1, 16, 256-1);
+ lscreen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2_left));
+ lscreen.set_palette(m_palette);
+
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_refresh_hz(59.1);
+ rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ rscreen.set_size(64*16, 32*16);
+ rscreen.set_visarea(0, 480-1, 16, 256-1);
+ rscreen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2_right));
+ rscreen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ rscreen.set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2_dual)
@@ -1406,18 +1412,18 @@ MACHINE_CONFIG_START(gaelco2_state::touchgo)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0400000, 1 * 0x0400000, 0, 0)
- MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 0, 0);
+ gaelco.add_route(0, "rspeaker", 1.0);
+ gaelco.add_route(1, "lspeaker", 1.0);
+}
-MACHINE_CONFIG_START(gaelco2_state::touchgo_d5002fp)
+void gaelco2_state::touchgo_d5002fp(machine_config &config)
+{
touchgo(config);
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(32'000'000) / 2) /* 16 MHz */
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
-MACHINE_CONFIG_END
+ GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 16 MHz */
+}
/*
PCB Layout:
@@ -1667,13 +1673,14 @@ static INPUT_PORTS_START( snowboar )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
-MACHINE_CONFIG_START(gaelco2_state::snowboar)
+void gaelco2_state::snowboar(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(30'000'000) / 2) /* 15 MHz */
- MCFG_DEVICE_PROGRAM_MAP(snowboar_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(30'000'000) / 2); /* 15 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::snowboar_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
- EEPROM_93C66_16BIT(config, "eeprom");
+ EEPROM_93C66_16BIT(config, m_eeprom);
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1683,19 +1690,19 @@ MACHINE_CONFIG_START(gaelco2_state::snowboar)
m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 384-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0400000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1703,20 +1710,21 @@ MACHINE_CONFIG_START(gaelco2_state::snowboar)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_CG1V, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0400000, 1 * 0x0400000, 0, 0)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_cg1v_device &gaelco(GAELCO_CG1V(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 0, 0);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(gaelco2_state::maniacsqs)
+void gaelco2_state::maniacsqs(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2) /* 12 MHz - see PCB layout above with ROM set */
- MCFG_DEVICE_PROGRAM_MAP(snowboar_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz - see PCB layout above with ROM set */
+ m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::snowboar_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold));
- EEPROM_93C66_16BIT(config, "eeprom");
+ EEPROM_93C66_16BIT(config, m_eeprom);
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1726,19 +1734,19 @@ MACHINE_CONFIG_START(gaelco2_state::maniacsqs)
m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0, 320-1, 16, 256-1);
+ screen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2));
+ screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0080000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1746,12 +1754,12 @@ MACHINE_CONFIG_START(gaelco2_state::maniacsqs)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0080000, 1 * 0x0080000, 0, 0)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
/*
@@ -1956,14 +1964,14 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0xff, 0x8A, IPT_PADDLE_V ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_REVERSE PORT_NAME("P2 Wheel")
INPUT_PORTS_END
-MACHINE_CONFIG_START(wrally2_state::wrally2)
+void wrally2_state::wrally2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(26'000'000) / 2) /* 13 MHz */
- MCFG_DEVICE_PROGRAM_MAP(wrally2_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", gaelco2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(26'000'000) / 2); /* 13 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &wrally2_state::wrally2_map);
+ m_maincpu->set_vblank_int("lscreen", FUNC(gaelco2_state::irq6_line_hold));
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(26'000'000) / 2) /* 13 MHz */
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
+ GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(26'000'000) / 2).set_addrmap(0, &wrally2_state::mcu_hostmem_map); /* 13 MHz */
LS259(config, m_mainlatch); // IC6
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1972,28 +1980,27 @@ MACHINE_CONFIG_START(wrally2_state::wrally2)
m_mainlatch->q_out_cb<6>().set(FUNC(wrally2_state::wrally2_adc_cs)); /* ADCs chip select line */
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x0200000)
- MCFG_PALETTE_ADD("palette", 4096*16 - 16) /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
+ BUFFERED_SPRITERAM16(config, m_spriteram);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ PALETTE(config, m_palette, 4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
config.set_default_layout(layout_dualhsxs);
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(384, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2_left)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(384, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(gaelco2_state, screen_update_gaelco2_right)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE("palette")
-
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_refresh_hz(59.1);
+ lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ lscreen.set_size(384, 32*16);
+ lscreen.set_visarea(0, 384-1, 16, 256-1);
+ lscreen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2_left));
+ lscreen.set_palette(m_palette);
+
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_refresh_hz(59.1);
+ rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ rscreen.set_size(384, 32*16);
+ rscreen.set_visarea(0, 384-1, 16, 256-1);
+ rscreen.set_screen_update(FUNC(gaelco2_state::screen_update_gaelco2_right));
+ rscreen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ rscreen.set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2_dual)
@@ -2003,12 +2010,12 @@ MACHINE_CONFIG_START(wrally2_state::wrally2)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("gaelco", GAELCO_GAE1, 0)
- MCFG_GAELCO_SND_DATA("gfx1")
- MCFG_GAELCO_BANKS(0 * 0x0200000, 1 * 0x0200000, 0, 0)
- MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
-MACHINE_CONFIG_END
+ gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco"));
+ gaelco.set_snd_data_tag("gfx1");
+ gaelco.set_bank_offsets(0 * 0x0200000, 1 * 0x0200000, 0, 0);
+ gaelco.add_route(0, "lspeaker", 1.0);
+ gaelco.add_route(1, "rspeaker", 1.0);
+}
/*
PCB Layout:
diff --git a/src/mame/drivers/spcforce.cpp b/src/mame/drivers/spcforce.cpp
index 306b0abb6cb..c2bd8871b2b 100644
--- a/src/mame/drivers/spcforce.cpp
+++ b/src/mame/drivers/spcforce.cpp
@@ -90,9 +90,9 @@ WRITE8_MEMBER(spcforce_state::sn76496_select_w)
{
m_sn76496_select = data;
- if (!BIT(data, 6)) m_sn1->write(m_sn76496_latch);
- if (!BIT(data, 5)) m_sn2->write(m_sn76496_latch);
- if (!BIT(data, 4)) m_sn3->write(m_sn76496_latch);
+ if (!BIT(data, 6)) m_sn[0]->write(m_sn76496_latch);
+ if (!BIT(data, 5)) m_sn[1]->write(m_sn76496_latch);
+ if (!BIT(data, 4)) m_sn[2]->write(m_sn76496_latch);
}
READ_LINE_MEMBER(spcforce_state::t0_r)
@@ -282,13 +282,13 @@ INTERRUPT_GEN_MEMBER(spcforce_state::vblank_irq)
device.execute().set_input_line(3, HOLD_LINE);
}
-MACHINE_CONFIG_START(spcforce_state::spcforce)
-
+void spcforce_state::spcforce(machine_config &config)
+{
/* basic machine hardware */
/* FIXME: The 8085A had a max clock of 6MHz, internally divided by 2! */
- MCFG_DEVICE_ADD("maincpu", I8085A, 8000000 * 2) /* 4.00 MHz??? */
- MCFG_DEVICE_PROGRAM_MAP(spcforce_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", spcforce_state, vblank_irq)
+ I8085A(config, m_maincpu, 8000000 * 2); /* 4.00 MHz??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &spcforce_state::spcforce_map);
+ m_maincpu->set_vblank_int("screen", FUNC(spcforce_state::vblank_irq));
I8035(config, m_audiocpu, 6144000); /* divisor ??? */
m_audiocpu->set_addrmap(AS_PROGRAM, &spcforce_state::spcforce_sound_map);
@@ -304,35 +304,35 @@ MACHINE_CONFIG_START(spcforce_state::spcforce)
m_mainlatch->q_out_cb<7>().set(FUNC(spcforce_state::unknown_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(spcforce_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_spcforce)
- MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(colortable_source))
- MCFG_PALETTE_INIT_OWNER(spcforce_state, spcforce)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
+ screen.set_screen_update(FUNC(spcforce_state::screen_update));
+ screen.set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_spcforce);
+ PALETTE(config, m_palette, ARRAY_LENGTH(colortable_source));
+ m_palette->set_init(FUNC(spcforce_state::palette_init_spcforce));
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("sn1", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_SN76496_READY_HANDLER(WRITELINE(*this, spcforce_state, write_sn1_ready))
+ SN76496(config, m_sn[0], 2000000);
+ m_sn[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
+ m_sn[0]->ready_cb().set(FUNC(spcforce_state::write_sn1_ready));
- MCFG_DEVICE_ADD("sn2", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_SN76496_READY_HANDLER(WRITELINE(*this, spcforce_state, write_sn2_ready))
+ SN76496(config, m_sn[1], 2000000);
+ m_sn[1]->add_route(ALL_OUTPUTS, "mono", 1.0);
+ m_sn[1]->ready_cb().set(FUNC(spcforce_state::write_sn2_ready));
- MCFG_DEVICE_ADD("sn3", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_SN76496_READY_HANDLER(WRITELINE(*this, spcforce_state, write_sn3_ready))
-MACHINE_CONFIG_END
+ SN76496(config, m_sn[2], 2000000);
+ m_sn[2]->add_route(ALL_OUTPUTS, "mono", 1.0);
+ m_sn[2]->ready_cb().set(FUNC(spcforce_state::write_sn3_ready));
+}
void spcforce_state::meteors(machine_config &config)
{
diff --git a/src/mame/includes/crvision.h b/src/mame/includes/crvision.h
index 76c8dce7c87..c32b1670724 100644
--- a/src/mame/includes/crvision.h
+++ b/src/mame/includes/crvision.h
@@ -36,6 +36,7 @@ public:
m_psg(*this, SN76489_TAG),
m_cassette(*this, "cassette"),
m_cart(*this, "cartslot"),
+ m_centronics(*this, CENTRONICS_TAG),
m_cent_data_out(*this, "cent_data_out"),
m_ram(*this, RAM_TAG),
m_inp_pa0(*this, "PA0.%u", 0),
@@ -49,6 +50,7 @@ public:
required_device<sn76496_base_device> m_psg;
required_device<cassette_image_device> m_cassette;
required_device<crvision_cart_slot_device> m_cart;
+ required_device<centronics_device> m_centronics;
required_device<output_latch_device> m_cent_data_out;
required_device<ram_device> m_ram;
optional_ioport_array<8> m_inp_pa0;
diff --git a/src/mame/includes/fmtowns.h b/src/mame/includes/fmtowns.h
index 9cbd11d0700..3989d750b5a 100644
--- a/src/mame/includes/fmtowns.h
+++ b/src/mame/includes/fmtowns.h
@@ -155,10 +155,10 @@ protected:
virtual void driver_start() override;
required_device<ram_device> m_ram;
+ required_device<cpu_device> m_maincpu;
private:
/* devices */
- required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_device<pic8259_device> m_pic_master;
required_device<pic8259_device> m_pic_slave;
diff --git a/src/mame/includes/gaelco2.h b/src/mame/includes/gaelco2.h
index 38dfa743fb0..f7d4f336e5b 100644
--- a/src/mame/includes/gaelco2.h
+++ b/src/mame/includes/gaelco2.h
@@ -15,11 +15,11 @@ public:
m_maincpu(*this,"maincpu"),
m_mainlatch(*this, "mainlatch"),
m_spriteram(*this,"spriteram"),
- m_vregs(*this, "vregs"),
- m_snowboar_protection(*this, "snowboar_prot"),
m_eeprom(*this, "eeprom"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
+ m_vregs(*this, "vregs"),
+ m_snowboar_protection(*this, "snowboar_prot"),
m_generic_paletteram_16(*this, "paletteram"),
m_shareram(*this, "shareram")
{ }
@@ -53,6 +53,10 @@ public:
protected:
required_device<m68000_device> m_maincpu;
optional_device<ls259_device> m_mainlatch;
+ required_device<buffered_spriteram16_device> m_spriteram;
+ optional_device<eeprom_serial_93cxx_device> m_eeprom;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
DECLARE_WRITE16_MEMBER(gaelco2_vram_w);
DECLARE_WRITE16_MEMBER(gaelco2_palette_w);
@@ -92,12 +96,8 @@ private:
tilemap_t *m_pant[2];
int m_dual_monitor;
- required_device<buffered_spriteram16_device> m_spriteram;
required_shared_ptr<uint16_t> m_vregs;
optional_shared_ptr<uint16_t> m_snowboar_protection;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
required_shared_ptr<uint16_t> m_generic_paletteram_16;
optional_shared_ptr<uint16_t> m_shareram;
};
diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h
index c53add56e7a..be4bc41c960 100644
--- a/src/mame/includes/spcforce.h
+++ b/src/mame/includes/spcforce.h
@@ -20,9 +20,7 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_sn1(*this, "sn1"),
- m_sn2(*this, "sn2"),
- m_sn3(*this, "sn3"),
+ m_sn(*this, "sn%u", 1U),
m_scrollram(*this, "scrollram"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
@@ -63,9 +61,7 @@ private:
required_device<i8035_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- required_device<sn76496_device> m_sn1;
- required_device<sn76496_device> m_sn2;
- required_device<sn76496_device> m_sn3;
+ required_device_array<sn76496_device, 3> m_sn;
required_shared_ptr<uint8_t> m_scrollram;
required_shared_ptr<uint8_t> m_videoram;
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index eade55d08ed..f07424147e5 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -119,18 +119,18 @@ READ8_MEMBER(st0016_cpu_device::soundram_read)
}
/* CPU interface */
-MACHINE_CONFIG_START(st0016_cpu_device::device_add_mconfig)
+void st0016_cpu_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_PALETTE_ADD("palette", 16*16*4+1)
-
- MCFG_DEVICE_ADD("stsnd", ST0016, 0)
- MCFG_ST0016_SOUNDRAM_READ_CB(READ8(*this, st0016_cpu_device, soundram_read))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ PALETTE(config, "palette", 16*16*4+1);
-MACHINE_CONFIG_END
+ st0016_device &stsnd(ST0016(config, "stsnd", 0));
+ stsnd.ram_read().set(FUNC(st0016_cpu_device::soundram_read));
+ stsnd.add_route(0, "lspeaker", 1.0);
+ stsnd.add_route(1, "rspeaker", 1.0);
+}
static const gfx_layout charlayout =