summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/bus/hp80_io/82937.cpp2
-rw-r--r--src/devices/bus/hp80_io/hp80_io.h2
-rw-r--r--src/devices/bus/hp9845_io/98032.cpp2
-rw-r--r--src/devices/bus/hp9845_io/98034.cpp2
-rw-r--r--src/devices/bus/hp9845_io/98035.cpp2
-rw-r--r--src/devices/bus/hp9845_io/hp9845_io.h2
-rw-r--r--src/devices/bus/isa/ide.cpp7
-rw-r--r--src/devices/bus/lpci/i82439tx.h6
-rw-r--r--src/devices/bus/rs232/ie15.cpp12
-rw-r--r--src/devices/bus/rs232/keyboard.cpp10
-rw-r--r--src/devices/bus/rs232/null_modem.cpp13
-rw-r--r--src/devices/bus/rs232/printer.cpp10
-rw-r--r--src/devices/bus/rs232/pty.cpp12
-rw-r--r--src/devices/bus/rs232/rs232.h10
-rw-r--r--src/devices/bus/rs232/terminal.cpp12
-rw-r--r--src/devices/machine/laserdsc.cpp22
-rw-r--r--src/devices/machine/laserdsc.h58
-rw-r--r--src/devices/machine/ldpr8210.h10
-rw-r--r--src/devices/machine/ldv1000.h10
-rw-r--r--src/devices/machine/lpci.h39
-rw-r--r--src/devices/machine/netlist.h46
-rw-r--r--src/devices/machine/sdlc.h13
-rw-r--r--src/devices/machine/sis85c496.h8
-rw-r--r--src/devices/video/huc6272.cpp6
24 files changed, 103 insertions, 213 deletions
diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp
index c0412610cb0..171d4a62204 100644
--- a/src/devices/bus/hp80_io/82937.cpp
+++ b/src/devices/bus/hp80_io/82937.cpp
@@ -186,7 +186,7 @@ WRITE_LINE_MEMBER(hp82937_io_card_device::ieee488_ctrl_w)
}
static INPUT_PORTS_START(hp82937_port)
- MCFG_HP80_IO_SC(7)
+ PORT_HP80_IO_SC(7)
PORT_START("sw1")
PORT_DIPNAME(0x1f , 0x15 , "HPIB address")
PORT_DIPLOCATION("S1:7,6,5,4,3")
diff --git a/src/devices/bus/hp80_io/hp80_io.h b/src/devices/bus/hp80_io/hp80_io.h
index 886e7ce414a..1e51bf9b8b8 100644
--- a/src/devices/bus/hp80_io/hp80_io.h
+++ b/src/devices/bus/hp80_io/hp80_io.h
@@ -16,7 +16,7 @@
#define HP80_IO_FIRST_SC 3 // Lowest SC used by I/O cards
-#define MCFG_HP80_IO_SC(_default_sc) \
+#define PORT_HP80_IO_SC(_default_sc) \
PORT_START("SC") \
PORT_CONFNAME(0xf , (_default_sc) - HP80_IO_FIRST_SC , "Select Code") \
PORT_CONFSETTING(0 , "3")\
diff --git a/src/devices/bus/hp9845_io/98032.cpp b/src/devices/bus/hp9845_io/98032.cpp
index fc55a786fe2..221d4e9e176 100644
--- a/src/devices/bus/hp9845_io/98032.cpp
+++ b/src/devices/bus/hp9845_io/98032.cpp
@@ -65,7 +65,7 @@ void hp98032_io_card_device::device_add_mconfig(machine_config &config)
}
static INPUT_PORTS_START(hp98032_port)
- MCFG_HP9845_IO_SC(2)
+ PORT_HP9845_IO_SC(2)
INPUT_PORTS_END
ioport_constructor hp98032_io_card_device::device_input_ports() const
diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp
index ab2985db6e2..9f016eaa3d8 100644
--- a/src/devices/bus/hp9845_io/98034.cpp
+++ b/src/devices/bus/hp9845_io/98034.cpp
@@ -41,7 +41,7 @@ hp98034_io_card_device::~hp98034_io_card_device()
}
static INPUT_PORTS_START(hp98034_port)
- MCFG_HP9845_IO_SC(7)
+ PORT_HP9845_IO_SC(7)
PORT_START("sw1")
PORT_DIPNAME(0x1f , 0x15 , "HPIB address")
PORT_DIPLOCATION("S1:1,2,3,4,5")
diff --git a/src/devices/bus/hp9845_io/98035.cpp b/src/devices/bus/hp9845_io/98035.cpp
index a91be580774..891ff92a167 100644
--- a/src/devices/bus/hp9845_io/98035.cpp
+++ b/src/devices/bus/hp9845_io/98035.cpp
@@ -154,7 +154,7 @@ hp98035_io_card_device::~hp98035_io_card_device()
}
static INPUT_PORTS_START(hp98035_port)
- MCFG_HP9845_IO_SC(9)
+ PORT_HP9845_IO_SC(9)
INPUT_PORTS_END
ioport_constructor hp98035_io_card_device::device_input_ports() const
diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h
index c85f7632ffe..c62c8625563 100644
--- a/src/devices/bus/hp9845_io/hp9845_io.h
+++ b/src/devices/bus/hp9845_io/hp9845_io.h
@@ -15,7 +15,7 @@
#define HP9845_IO_FIRST_SC 1 // Lowest SC used by I/O cards
-#define MCFG_HP9845_IO_SC(_default_sc) \
+#define PORT_HP9845_IO_SC(_default_sc) \
PORT_START("SC") \
PORT_CONFNAME(0xf , (_default_sc) - HP9845_IO_FIRST_SC , "Select Code") \
PORT_CONFSETTING(0 , "1")\
diff --git a/src/devices/bus/isa/ide.cpp b/src/devices/bus/isa/ide.cpp
index 1fe270399bb..1b1c832cc9c 100644
--- a/src/devices/bus/isa/ide.cpp
+++ b/src/devices/bus/isa/ide.cpp
@@ -11,6 +11,7 @@
#include "imagedev/harddriv.h"
#include "machine/idectrl.h"
+#include "sound/cdda.h"
#include "speaker.h"
@@ -48,9 +49,9 @@ WRITE_LINE_MEMBER(isa16_ide_device::ide_interrupt)
void isa16_ide_device::cdrom_headphones(device_t *device)
{
- device = device->subdevice("cdda");
- MCFG_SOUND_ROUTE(0, "^^lheadphone", 1.0)
- MCFG_SOUND_ROUTE(1, "^^rheadphone", 1.0)
+ cdda_device *cdda = device->subdevice<cdda_device>("cdda");
+ cdda->add_route(0, "^^lheadphone", 1.0);
+ cdda->add_route(1, "^^rheadphone", 1.0);
}
static INPUT_PORTS_START( ide )
diff --git a/src/devices/bus/lpci/i82439tx.h b/src/devices/bus/lpci/i82439tx.h
index 395d4142559..3bb2671ecb7 100644
--- a/src/devices/bus/lpci/i82439tx.h
+++ b/src/devices/bus/lpci/i82439tx.h
@@ -16,12 +16,6 @@
#include "pci.h"
#include "northbridge.h"
-#define MCFG_I82439TX_CPU( _tag ) \
- downcast<i82439tx_device &>(*device).set_cpu(_tag);
-
-#define MCFG_I82439TX_REGION( _tag ) \
- downcast<i82439tx_device &>(*device).set_region(_tag);
-
// ======================> i82439tx_device
class i82439tx_device : public northbridge_device, public pci_device_interface
diff --git a/src/devices/bus/rs232/ie15.cpp b/src/devices/bus/rs232/ie15.cpp
index 74387086782..72520f87dea 100644
--- a/src/devices/bus/rs232/ie15.cpp
+++ b/src/devices/bus/rs232/ie15.cpp
@@ -19,12 +19,12 @@ ie15_terminal_device::ie15_terminal_device(const machine_config &mconfig, const
static INPUT_PORTS_START(ie15_terminal)
PORT_INCLUDE(ie15)
- MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", ie15_terminal_device, update_serial)
- MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", ie15_terminal_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", ie15_terminal_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", ie15_terminal_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", ie15_terminal_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", ie15_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", ie15_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", ie15_terminal_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", ie15_terminal_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", ie15_terminal_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", ie15_terminal_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", ie15_terminal_device, update_serial)
INPUT_PORTS_END
ioport_constructor ie15_terminal_device::device_input_ports() const
diff --git a/src/devices/bus/rs232/keyboard.cpp b/src/devices/bus/rs232/keyboard.cpp
index 6e73ee30fc7..31d77555d06 100644
--- a/src/devices/bus/rs232/keyboard.cpp
+++ b/src/devices/bus/rs232/keyboard.cpp
@@ -7,11 +7,11 @@ namespace {
INPUT_PORTS_START(serial_keyboard)
PORT_INCLUDE(generic_keyboard)
- MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", serial_keyboard_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_keyboard_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_keyboard_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_keyboard_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_keyboard_device, update_serial)
+ PORT_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", serial_keyboard_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_keyboard_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_keyboard_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_keyboard_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_keyboard_device, update_serial)
INPUT_PORTS_END
} // anonymous namespace
diff --git a/src/devices/bus/rs232/null_modem.cpp b/src/devices/bus/rs232/null_modem.cpp
index 08366b01df9..5cff5d8cf89 100644
--- a/src/devices/bus/rs232/null_modem.cpp
+++ b/src/devices/bus/rs232/null_modem.cpp
@@ -28,12 +28,13 @@ void null_modem_device::device_add_mconfig(machine_config &config)
}
static INPUT_PORTS_START(null_modem)
- MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", null_modem_device, update_serial)
- MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", null_modem_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", null_modem_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", null_modem_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", null_modem_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", null_modem_device, update_serial)
+ PORT_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", null_modem_device, update_serial)
+ PORT_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", null_modem_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", null_modem_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", null_modem_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", null_modem_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", null_modem_device, update_serial)
+
PORT_START("FLOW_CONTROL")
PORT_CONFNAME(0x01, 0x00, "Flow Control")
PORT_CONFSETTING(0x00, "Off")
diff --git a/src/devices/bus/rs232/printer.cpp b/src/devices/bus/rs232/printer.cpp
index fb87c9ead79..b9e13ca4ef2 100644
--- a/src/devices/bus/rs232/printer.cpp
+++ b/src/devices/bus/rs232/printer.cpp
@@ -23,11 +23,11 @@ void serial_printer_device::device_add_mconfig(machine_config &config)
}
static INPUT_PORTS_START(serial_printer)
- MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", serial_printer_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_printer_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_printer_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_printer_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_printer_device, update_serial)
+ PORT_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", serial_printer_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_printer_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_printer_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_printer_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_printer_device, update_serial)
INPUT_PORTS_END
ioport_constructor serial_printer_device::device_input_ports() const
diff --git a/src/devices/bus/rs232/pty.cpp b/src/devices/bus/rs232/pty.cpp
index 919b85b777b..4c8c9f6bbf7 100644
--- a/src/devices/bus/rs232/pty.cpp
+++ b/src/devices/bus/rs232/pty.cpp
@@ -50,12 +50,12 @@ WRITE_LINE_MEMBER(pseudo_terminal_device::update_serial)
}
static INPUT_PORTS_START(pseudo_terminal)
- MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial)
- MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial)
INPUT_PORTS_END
ioport_constructor pseudo_terminal_device::device_input_ports() const
diff --git a/src/devices/bus/rs232/rs232.h b/src/devices/bus/rs232/rs232.h
index 95a5477f1c3..781fb95d072 100644
--- a/src/devices/bus/rs232/rs232.h
+++ b/src/devices/bus/rs232/rs232.h
@@ -24,7 +24,7 @@
#define RS232_BAUD_115200 (0x0d)
#define RS232_BAUD_7200 (0x0e)
-#define MCFG_RS232_BAUD(_tag, _default_baud, _description, _class, _write_line) \
+#define PORT_RS232_BAUD(_tag, _default_baud, _description, _class, _write_line) \
PORT_START(_tag) \
PORT_CONFNAME(0xff, _default_baud, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \
PORT_CONFSETTING( RS232_BAUD_110, "110") \
@@ -46,7 +46,7 @@
#define RS232_STARTBITS_0 (0x00)
#define RS232_STARTBITS_1 (0x01)
-#define MCFG_RS232_STARTBITS(_tag, _default_startbits, _description, _class, _write_line) \
+#define PORT_RS232_STARTBITS(_tag, _default_startbits, _description, _class, _write_line) \
PORT_START(_tag) \
PORT_CONFNAME(0xff, _default_startbits, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \
PORT_CONFSETTING( RS232_STARTBITS_0, "0") \
@@ -57,7 +57,7 @@
#define RS232_DATABITS_7 (0x02)
#define RS232_DATABITS_8 (0x03)
-#define MCFG_RS232_DATABITS(_tag, _default_databits, _description, _class, _write_line) \
+#define PORT_RS232_DATABITS(_tag, _default_databits, _description, _class, _write_line) \
PORT_START(_tag) \
PORT_CONFNAME(0xff, _default_databits, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \
PORT_CONFSETTING( RS232_DATABITS_5, "5") \
@@ -71,7 +71,7 @@
#define RS232_PARITY_MARK (0x03)
#define RS232_PARITY_SPACE (0x04)
-#define MCFG_RS232_PARITY(_tag, _default_parity, _description, _class, _write_line) \
+#define PORT_RS232_PARITY(_tag, _default_parity, _description, _class, _write_line) \
PORT_START(_tag) \
PORT_CONFNAME(0xff, _default_parity, "Parity") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \
PORT_CONFSETTING( RS232_PARITY_NONE, "None") \
@@ -85,7 +85,7 @@
#define RS232_STOPBITS_1_5 (0x02)
#define RS232_STOPBITS_2 (0x03)
-#define MCFG_RS232_STOPBITS(_tag, _default_stopbits, _description, _class, _write_line) \
+#define PORT_RS232_STOPBITS(_tag, _default_stopbits, _description, _class, _write_line) \
PORT_START(_tag) \
PORT_CONFNAME(0xff, 0x01, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \
PORT_CONFSETTING( RS232_STOPBITS_0, "0") \
diff --git a/src/devices/bus/rs232/terminal.cpp b/src/devices/bus/rs232/terminal.cpp
index 5a638a6c8db..0955cd58a99 100644
--- a/src/devices/bus/rs232/terminal.cpp
+++ b/src/devices/bus/rs232/terminal.cpp
@@ -19,12 +19,12 @@ serial_terminal_device::serial_terminal_device(const machine_config &mconfig, co
static INPUT_PORTS_START(serial_terminal)
PORT_INCLUDE(generic_terminal)
- MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", serial_terminal_device, update_serial)
- MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", serial_terminal_device, update_serial)
- MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_terminal_device, update_serial)
- MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_terminal_device, update_serial)
- MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_terminal_device, update_serial)
- MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", serial_terminal_device, update_serial)
+ PORT_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", serial_terminal_device, update_serial)
+ PORT_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", serial_terminal_device, update_serial)
+ PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", serial_terminal_device, update_serial)
+ PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", serial_terminal_device, update_serial)
+ PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", serial_terminal_device, update_serial)
INPUT_PORTS_END
ioport_constructor serial_terminal_device::device_input_ports() const
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index f797289bf52..7794ebb026e 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -642,7 +642,7 @@ void laserdisc_device::init_disc()
{
// get a handle to the disc to play
if (!m_getdisc_callback.isnull())
- m_disc = m_getdisc_callback(*this);
+ m_disc = m_getdisc_callback();
else
m_disc = machine().rom_load().get_disk_handle(tag());
@@ -1017,7 +1017,7 @@ void laserdisc_device::process_track_data()
// pass the audio to the callback
if (!m_audio_callback.isnull())
- m_audio_callback(*this, m_samplerate, m_audiocursamples, m_avhuff_config.audio[0], m_avhuff_config.audio[1]);
+ m_audio_callback(m_samplerate, m_audiocursamples, m_avhuff_config.audio[0], m_avhuff_config.audio[1]);
// shift audio data if we read it into the beginning of the buffer
if (m_audiocursamples != 0 && m_audiobufin != 0)
@@ -1134,3 +1134,21 @@ void laserdisc_device::config_save(config_type cfg_type, util::xml::data_node *p
ldnode->delete_node();
}
}
+
+void laserdisc_device::add_ntsc_screen(machine_config &config, const char *_tag)
+{
+ set_screen(_tag);
+ screen_device &screen(SCREEN(config, _tag, SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_SELF_RENDER);
+ screen.set_raw(XTAL(14'318'181)*2, 910, 0, 704, 525, 44, 524);
+ screen.set_screen_update(tag(), FUNC(laserdisc_device::screen_update));
+}
+
+void laserdisc_device::add_pal_screen(machine_config &config, const char *_tag)
+{
+ set_screen(_tag);
+ screen_device &screen(SCREEN(config, _tag, SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_SELF_RENDER);
+ screen.set_raw(XTAL(17'734'470)*2, 1135, 0, 768, 625, 48, 624);
+ screen.set_screen_update(tag(), FUNC(laserdisc_device::screen_update));
+}
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index 2539d608e5f..510d22366ec 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -56,49 +56,6 @@ enum laserdisc_field_code
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_GET_DISC(_func) \
- downcast<laserdisc_device &>(*device).set_get_disc(_func);
-#define MCFG_LASERDISC_AUDIO(_func) \
- downcast<laserdisc_device &>(*device).set_audio(_func);
-#define MCFG_LASERDISC_SCREEN(_tag) \
- downcast<laserdisc_device &>(*device).set_screen(_tag);
-#define MCFG_LASERDISC_OVERLAY_DRIVER(_width, _height, _class, _method) \
- downcast<laserdisc_device &>(*device).set_overlay(_width, _height, &_class::_method, #_class "::" #_method);
-#define MCFG_LASERDISC_OVERLAY_DEVICE(_width, _height, _device, _class, _method) \
- downcast<laserdisc_device &>(*device).set_overlay(_width, _height, _device, &_class::_method, #_class "::" #_method);
-#define MCFG_LASERDISC_OVERLAY_CLIP(_minx, _maxx, _miny, _maxy) \
- downcast<laserdisc_device &>(*device).set_overlay_clip(_minx, _maxx, _miny, _maxy);
-#define MCFG_LASERDISC_OVERLAY_POSITION(_posx, _posy) \
- downcast<laserdisc_device &>(*device).set_overlay_position(_posx, _posy);
-#define MCFG_LASERDISC_OVERLAY_SCALE(_scalex, _scaley) \
- downcast<laserdisc_device &>(*device).set_overlay_scale(_scalex, _scaley);
-#define MCFG_LASERDISC_OVERLAY_PALETTE(_palette_tag) \
- downcast<laserdisc_device &>(*device).set_overlay_palette(_palette_tag);
-
-// use these to add laserdisc screens with proper video update parameters
-// TODO: actually move these SCREEN_RAW_PARAMS to a common screen info header
-// TODO: someday we'll kill the pixel clock hack ...
-#define MCFG_LASERDISC_SCREEN_ADD_NTSC(_tag, _ldtag) \
- MCFG_DEVICE_MODIFY(_ldtag) \
- downcast<laserdisc_device &>(*device).set_screen(_tag); \
- MCFG_SCREEN_ADD(_tag, RASTER) \
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER) \
- MCFG_SCREEN_RAW_PARAMS(XTAL(14'318'181)*2, 910, 0, 704, 525, 44, 524) \
- MCFG_SCREEN_UPDATE_DEVICE(_ldtag, laserdisc_device, screen_update)
-
-#define MCFG_LASERDISC_SCREEN_ADD_PAL(_tag, _ldtag) \
- MCFG_DEVICE_MODIFY(_ldtag) \
- downcast<laserdisc_device &>(*device).set_screen(_tag); \
- MCFG_SCREEN_ADD(_tag, RASTER) \
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER) \
- MCFG_SCREEN_RAW_PARAMS(XTAL(17'734'470)*2, 1135, 0, 768, 625, 48, 624) \
- MCFG_SCREEN_UPDATE_DEVICE(_ldtag, laserdisc_device, screen_update)
-
-
-//**************************************************************************
// MACROS
//**************************************************************************
@@ -136,13 +93,16 @@ protected:
public:
// delegates
- typedef delegate<chd_file *(laserdisc_device &device)> get_disc_delegate;
- typedef delegate<void (laserdisc_device &device, int samplerate, int samples, const int16_t *ch0, const int16_t *ch1)> audio_delegate;
-
+ typedef device_delegate<chd_file *(void)> get_disc_delegate;
+ typedef device_delegate<void (int samplerate, int samples, const int16_t *ch0, const int16_t *ch1)> audio_delegate;
laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- // reset line control
+ // use these to add laserdisc screens with proper video update parameters
+ // TODO: actually move these SCREEN_RAW_PARAMS to a common screen info header
+ // TODO: someday we'll kill the pixel clock hack ...
+ void add_ntsc_screen(machine_config &config, const char *tag);
+ void add_pal_screen(machine_config &config, const char *tag);
// core control and status
bool video_active() { return (!m_videosquelch && current_frame().m_numfields >= 2); }
@@ -162,8 +122,8 @@ public:
void set_overlay_config(const laserdisc_overlay_config &config) { static_cast<laserdisc_overlay_config &>(*this) = config; }
// configuration helpers
- void set_get_disc(get_disc_delegate &&callback) { m_getdisc_callback = std::move(callback); }
- void set_audio(audio_delegate &&callback) { m_audio_callback = std::move(callback); }
+ template <typename... T> void set_get_disc(T &&... args) { m_getdisc_callback = get_disc_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_audio(T &&... args) { m_audio_callback = audio_delegate(std::forward<T>(args)...); }
template <class FunctionClass>
// FIXME: these should be aware of current device for resolving the tag
void set_overlay(uint32_t width, uint32_t height, u32 (FunctionClass::*callback)(screen_device &, bitmap_ind16 &, const rectangle &), const char *name)
diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h
index fc0a28d6d26..ed97f0f8fd2 100644
--- a/src/devices/machine/ldpr8210.h
+++ b/src/devices/machine/ldpr8210.h
@@ -18,14 +18,6 @@
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_PR8210_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PIONEER_PR8210, 0)
-
-
-//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -46,7 +38,7 @@ class pioneer_pr8210_device : public laserdisc_device
{
public:
// construction/destruction
- pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// input and output
void control_w(uint8_t data);
diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h
index 55516da36fe..883bca49a71 100644
--- a/src/devices/machine/ldv1000.h
+++ b/src/devices/machine/ldv1000.h
@@ -20,14 +20,6 @@
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_LDV1000_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PIONEER_LDV1000, 0)
-
-
-//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -47,7 +39,7 @@ class pioneer_ldv1000_device : public laserdisc_device
{
public:
// construction/destruction
- pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
auto command_strobe_callback() { return m_command_strobe_cb.bind(); }
diff --git a/src/devices/machine/lpci.h b/src/devices/machine/lpci.h
index d9e9bf9aeb1..d399e2da79d 100644
--- a/src/devices/machine/lpci.h
+++ b/src/devices/machine/lpci.h
@@ -17,15 +17,20 @@
// TYPE DEFINITIONS
//**************************************************************************
-typedef device_delegate<uint32_t (int function, int reg, uint32_t mem_mask)> pci_bus_legacy_read_delegate;
-typedef device_delegate<void (int function, int reg, uint32_t data, uint32_t mem_mask)> pci_bus_legacy_write_delegate;
-
// ======================> pci_bus_legacy_device
class pci_bus_legacy_device : public device_t
{
public:
+ typedef device_delegate<uint32_t (int function, int reg, uint32_t mem_mask)> pci_bus_legacy_read_delegate;
+ typedef device_delegate<void (int function, int reg, uint32_t data, uint32_t mem_mask)> pci_bus_legacy_write_delegate;
+
// construction/destruction
+ pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t busnum)
+ : pci_bus_legacy_device(mconfig, tag, owner, clock)
+ {
+ set_busnum(busnum);
+ }
pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ32_MEMBER( read );
@@ -36,8 +41,9 @@ public:
void set_busnum(int busnum) { m_busnum = busnum; }
void set_father(const char *father) { m_father = father; }
- void set_device(int num, pci_bus_legacy_read_delegate read_func, pci_bus_legacy_write_delegate write_func) {
- m_read_callback[num] = read_func; m_write_callback[num] = write_func; }
+
+ template <typename... T> void set_device_read(int num, T &&... args) { m_read_callback[num] = pci_bus_legacy_read_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_device_write(int num, T &&... args) { m_write_callback[num] = pci_bus_legacy_write_delegate(std::forward<T>(args)...); }
pci_bus_legacy_device *pci_search_bustree(int busnum, int devicenum, pci_bus_legacy_device *pcibus);
void add_sibling(pci_bus_legacy_device *sibling, int busnum);
@@ -49,17 +55,17 @@ protected:
virtual void device_post_load() override;
private:
- uint8_t m_busnum;
+ uint8_t m_busnum;
pci_bus_legacy_read_delegate m_read_callback[32];
pci_bus_legacy_write_delegate m_write_callback[32];
const char * m_father;
pci_bus_legacy_device * m_siblings[8];
- uint8_t m_siblings_busnum[8];
+ uint8_t m_siblings_busnum[8];
int m_siblings_count;
offs_t m_address;
- int8_t m_devicenum; // device number we are addressing
- int8_t m_busnumber; // pci bus number we are addressing
+ int8_t m_devicenum; // device number we are addressing
+ int8_t m_busnumber; // pci bus number we are addressing
pci_bus_legacy_device * m_busnumaddr; // pci bus we are addressing
};
@@ -67,19 +73,4 @@ private:
DECLARE_DEVICE_TYPE(PCI_BUS_LEGACY, pci_bus_legacy_device)
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_PCI_BUS_LEGACY_ADD(_tag, _busnum) \
- MCFG_DEVICE_ADD(_tag, PCI_BUS_LEGACY, 0) \
- downcast<pci_bus_legacy_device *>(device)->set_busnum(_busnum);
-#define MCFG_PCI_BUS_LEGACY_DEVICE(_devnum, _devtag, _devclass, _configread, _configwrite) \
- downcast<pci_bus_legacy_device *>(device)->set_device(_devnum, \
- pci_bus_legacy_read_delegate(&_devclass::_configread, #_devclass "::" #_configread, _devtag, (_devclass *)0), \
- pci_bus_legacy_write_delegate(&_devclass::_configwrite, #_devclass "::" #_configwrite, _devtag, (_devclass *)0));
-#define MCFG_PCI_BUS_LEGACY_SIBLING(_father_tag) \
- downcast<pci_bus_legacy_device *>(device)->set_father(_father_tag);
-
-
#endif // MAME_MACHINE_LPCI_H
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 7302780572d..946d1322ddc 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -31,52 +31,6 @@ namespace netlist {
// MAME specific configuration
-#define MCFG_NETLIST_SETUP(_setup) \
- downcast<netlist_mame_device &>(*device).set_setup_func(NETLIST_NAME(_setup));
-
-#if 0
-#define MCFG_NETLIST_SETUP_MEMBER(_obj, _setup) \
- downcast<netlist_mame_device &>(*device).set_constructor(_obj, _setup);
-
-#define MCFG_NETLIST_ANALOG_INPUT(_basetag, _tag, _name) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_INPUT, 0) \
- downcast<netlist_mame_analog_input_device &>(*device).set_name(_name);
-
-#define MCFG_NETLIST_ANALOG_MULT_OFFSET(_mult, _offset) \
- dynamic_cast<netlist_mame_sub_interface &>(*device).set_mult_offset(_mult, _offset);
-
-#define MCFG_NETLIST_ANALOG_OUTPUT(_basetag, _tag, _IN, _class, _member, _class_tag) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \
- downcast<netlist_mame_analog_output_device &>(*device).set_params(_IN, \
- FUNC(_class :: _member), _class_tag);
-
-#define MCFG_NETLIST_LOGIC_OUTPUT(_basetag, _tag, _IN, _class, _member, _class_tag) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_LOGIC_OUTPUT, 0) \
- downcast<netlist_mame_logic_output_device &>(*device).set_params(_IN, \
- netlist_mame_logic_output_device::output_delegate(& _class :: _member, \
- # _class "::" # _member, _class_tag, (_class *)nullptr) );
-
-#define MCFG_NETLIST_LOGIC_INPUT(_basetag, _tag, _name, _shift) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_LOGIC_INPUT, 0) \
- downcast<netlist_mame_logic_input_device &>(*device).set_params(_name, _shift);
-
-#define MCFG_NETLIST_INT_INPUT(_basetag, _tag, _name, _shift, _mask) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_INT_INPUT, 0) \
- downcast<netlist_mame_int_input_device &>(*device).set_params(_name, _mask, _shift);
-
-#define MCFG_NETLIST_RAM_POINTER(_basetag, _tag, _name) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_RAM_POINTER, 0) \
- downcast<netlist_mame_ram_pointer_device &>(*device).set_params(_name);
-
-#define MCFG_NETLIST_STREAM_INPUT(_basetag, _chan, _name) \
- MCFG_DEVICE_ADD(_basetag ":cin" # _chan, NETLIST_STREAM_INPUT, 0) \
- downcast<netlist_mame_stream_input_device &>(*device).set_params(_chan, _name);
-
-#define MCFG_NETLIST_STREAM_OUTPUT(_basetag, _chan, _name) \
- MCFG_DEVICE_ADD(_basetag ":cout" # _chan, NETLIST_STREAM_OUTPUT, 0) \
- downcast<netlist_mame_stream_output_device &>(*device).set_params(_chan, _name);
-#endif
-
#define NETLIST_LOGIC_PORT_CHANGED(_base, _tag) \
PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_logic_input_device, input_changed, 0)
diff --git a/src/devices/machine/sdlc.h b/src/devices/machine/sdlc.h
index 1b9b8efa832..5dd7b177c3e 100644
--- a/src/devices/machine/sdlc.h
+++ b/src/devices/machine/sdlc.h
@@ -10,19 +10,6 @@
#include <utility>
-#define MCFG_SDLC_LOGGER_DATA_NRZL \
- downcast<sdlc_logger_device &>(*device).clock_active(0);
-
-#define MCFG_SDLC_LOGGER_DATA_NRZI \
- downcast<sdlc_logger_device &>(*device).clock_active(1);
-
-#define MCFG_SDLC_LOGGER_CLOCK_ACTIVE_RISING \
- downcast<sdlc_logger_device &>(*device).clock_active(1);
-
-#define MCFG_SDLC_LOGGER_CLOCK_ACTIVE_FALLING \
- downcast<sdlc_logger_device &>(*device).clock_active(0);
-
-
class device_sdlc_consumer_interface : public device_interface
{
public:
diff --git a/src/devices/machine/sis85c496.h b/src/devices/machine/sis85c496.h
index 9de0499792c..33b80b58d62 100644
--- a/src/devices/machine/sis85c496.h
+++ b/src/devices/machine/sis85c496.h
@@ -25,10 +25,10 @@
#include "cpu/i386/i386.h"
#include "machine/at.h"
-#define MCFG_SIS85C496_ADD(_tag, _cpu_tag, _ram_size) \
- MCFG_PCI_HOST_ADD(_tag, SIS85C496, 0x10390496, 0x03, 0x00000000) \
- downcast<sis85c496_host_device *>(device)->set_cpu_tag(_cpu_tag); \
- downcast<sis85c496_host_device *>(device)->set_ram_size(_ram_size);
+#define SIS85C496_HOST(_config, _tag, _cpu_tag, _ram_size) \
+ pci_host_device &pcihost(PCI_HOST(_config, _tag, SIS85C496, 0x10390496, 0x03, 0x00000000)); \
+ pcihost.set_cpu_tag(_cpu_tag); \
+ pcihost.set_ram_size(_ram_size);
class sis85c496_host_device : public pci_host_device {
public:
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index fbf6a6c5726..b091b67afb9 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -574,9 +574,9 @@ void huc6272_device::interrupt_update()
void huc6272_device::cdrom_config(device_t *device)
{
- device = device->subdevice("cdda");
- MCFG_SOUND_ROUTE(0, "^^cdda_l", 1.0)
- MCFG_SOUND_ROUTE(1, "^^cdda_r", 1.0)
+ cdda_device *cdda = device->subdevice<cdda_device>("cdda");
+ cdda->add_route(0, "^^cdda_l", 1.0);
+ cdda->add_route(1, "^^cdda_r", 1.0);
}
//-------------------------------------------------