summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-09-05 18:50:13 +1000
committer Vas Crabb <vas@vastheman.com>2018-09-05 18:50:13 +1000
commitb6b299b566dfebd9c703932044bcef71f9f8732b (patch)
tree3c274a2efd00e5c8ed2cfb347d030694531a81da
parent2e3ccabfc09989aacb8209d990706386cba81fda (diff)
cleanup, follow-up, fixup - remember to use debug builds when doing bulk conversions to catch bad downcasts and other asserts (nw)
-rw-r--r--src/devices/machine/gt64xxx.h12
-rw-r--r--src/devices/machine/pci9050.h2
-rw-r--r--src/devices/machine/vrc4373.h2
-rw-r--r--src/devices/video/zeus2.h2
-rw-r--r--src/mame/drivers/aristmk5.cpp4
-rw-r--r--src/mame/drivers/twinkle.cpp2
-rw-r--r--src/mame/drivers/vegas.cpp12
-rw-r--r--src/mame/machine/midwayic.h3
8 files changed, 10 insertions, 29 deletions
diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h
index 12201b7b11a..4b47f0cb898 100644
--- a/src/devices/machine/gt64xxx.h
+++ b/src/devices/machine/gt64xxx.h
@@ -20,16 +20,6 @@ DECLARE_DEVICE_TYPE(GT64111, gt64111_device)
*************************************/
class gt64xxx_device : public pci_host_device {
public:
- template <typename T>
- gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num)
- : gt64xxx_device(mconfig, type, tag, owner, clock)
- {
- set_cpu_tag(std::forward<T>(cpu_tag));
- set_irq_num(irq_num);
- }
-
- gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
-
virtual void reset_all_mappings() override;
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;
@@ -81,6 +71,8 @@ public:
virtual void device_post_load() override;
protected:
+ gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
address_space *m_cpu_space;
virtual space_config_vector memory_space_config() const override;
virtual void device_start() override;
diff --git a/src/devices/machine/pci9050.h b/src/devices/machine/pci9050.h
index b6b2f172ba7..e1a6da148fd 100644
--- a/src/devices/machine/pci9050.h
+++ b/src/devices/machine/pci9050.h
@@ -20,8 +20,6 @@ class pci9050_device : public pci_device
public:
pci9050_device(const machine_config &mconfig, const char *tag, device_t *device, uint32_t clock);
- template <class Object> devcb_base &set_user_input_callback(Object &&cb) { return m_user_input_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_user_output_callback(Object &&cb) { return m_user_output_handler.set_callback(std::forward<Object>(cb)); }
auto user_input_callback() { return m_user_input_handler.bind(); }
auto user_output_callback() { return m_user_output_handler.bind(); }
diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h
index 57000115ded..dde4375e5ff 100644
--- a/src/devices/machine/vrc4373.h
+++ b/src/devices/machine/vrc4373.h
@@ -26,7 +26,7 @@ public:
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
virtual void device_post_load() override;
- template <class Object> devcb_base &set_irq_cb(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq_cb() { return m_irq_cb.bind(); }
template <typename T> void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); }
void set_ram_size(int size) { m_ram_size = size; };
void set_simm0_size(int size) { m_simm0_size = size; };
diff --git a/src/devices/video/zeus2.h b/src/devices/video/zeus2.h
index 68d10299fa9..82ef892f667 100644
--- a/src/devices/video/zeus2.h
+++ b/src/devices/video/zeus2.h
@@ -112,8 +112,6 @@ public:
TIMER_CALLBACK_MEMBER(display_irq_off);
TIMER_CALLBACK_MEMBER(display_irq);
- template <class Object> devcb_base &set_vblank_callback(Object &&cb) { return m_vblank.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq.set_callback(std::forward<Object>(cb)); }
auto vblank_callback() { return m_vblank.bind(); }
auto irq_callback() { return m_irq.bind(); }
diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp
index 7f7e0ab6678..c0f2bd4695c 100644
--- a/src/mame/drivers/aristmk5.cpp
+++ b/src/mame/drivers/aristmk5.cpp
@@ -2113,7 +2113,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(aristmk5_state::aristmk5_touch)
aristmk5(config);
- subdevice<ins8250_device>("uart_0a")
+ subdevice<ns16450_device>("uart_0a")
->out_tx_callback().set("microtouch", FUNC(microtouch_device::rx));
MCFG_MICROTOUCH_ADD("microtouch", 2400, WRITELINE("uart_0a", ins8250_uart_device, rx_w))
@@ -2127,7 +2127,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(aristmk5_state::aristmk5_usa_touch)
aristmk5_usa(config);
- subdevice<ins8250_device>("uart_0a")
+ subdevice<ns16450_device>("uart_0a")
->out_tx_callback().set("microtouch", FUNC(microtouch_device::rx));
MCFG_MICROTOUCH_ADD("microtouch", 2400, WRITELINE("uart_0a", ins8250_uart_device, rx_w))
diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp
index a689054312f..a77a5bde9be 100644
--- a/src/mame/drivers/twinkle.cpp
+++ b/src/mame/drivers/twinkle.cpp
@@ -1116,7 +1116,7 @@ MACHINE_CONFIG_START(twinkle_state::twinkle)
MCFG_RS232_RI_HANDLER(WRITELINE("fdc37c665gt:uart2", ins8250_uart_device, ri_w))
MCFG_RS232_CTS_HANDLER(WRITELINE("fdc37c665gt:uart2", ins8250_uart_device, cts_w))
- ins8250_device &uart(*subdevice<ins8250_device>("fdc37c665gt:uart2"));
+ ns16550_device &uart(*subdevice<ns16550_device>("fdc37c665gt:uart2"));
uart.out_tx_callback().set("rs232", FUNC(rs232_port_device::write_txd));
uart.out_dtr_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
uart.out_rts_callback().set("rs232", FUNC(rs232_port_device::write_rts));
diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp
index f399b0154ca..03881dfa565 100644
--- a/src/mame/drivers/vegas.cpp
+++ b/src/mame/drivers/vegas.cpp
@@ -1766,8 +1766,7 @@ MACHINE_CONFIG_START(vegas_state::vegascore)
voodoo_2_pci_device &voodoo(VOODOO_2_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, "screen"));
voodoo.set_fbmem(2);
voodoo.set_tmumem(4, 4);
- voodoo_device *voodoo_base = static_cast<voodoo_device*>(config.device_find(this, PCI_ID_VIDEO":voodoo"));
- voodoo_base->vblank_callback().set(FUNC(vegas_state::vblank_assert));
+ subdevice<voodoo_device>(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert));
M48T37(config, m_timekeeper);
m_timekeeper->reset_cb().set(FUNC(vegas_state::watchdog_reset));
@@ -1809,8 +1808,7 @@ MACHINE_CONFIG_START(vegas_state::vegasban)
vegas32m(config);
voodoo_banshee_pci_device &voodoo(VOODOO_BANSHEE_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen"));
voodoo.set_fbmem(16);
- voodoo_device *voodoo_base = static_cast<voodoo_device*>(config.device_find(this, PCI_ID_VIDEO":voodoo"));
- voodoo_base->vblank_callback().set(FUNC(vegas_state::vblank_assert));
+ subdevice<voodoo_device>(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert));
MACHINE_CONFIG_END
@@ -1823,8 +1821,7 @@ MACHINE_CONFIG_START(vegas_state::vegasv3)
voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen"));
voodoo.set_fbmem(16);
- voodoo_device *voodoo_base = static_cast<voodoo_device*>(config.device_find(this, PCI_ID_VIDEO":voodoo"));
- voodoo_base->vblank_callback().set(FUNC(vegas_state::vblank_assert));
+ subdevice<voodoo_device>(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert));
MACHINE_CONFIG_END
@@ -1840,8 +1837,7 @@ MACHINE_CONFIG_START(vegas_state::denver)
voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen"));
voodoo.set_fbmem(16);
- voodoo_device *voodoo_base = static_cast<voodoo_device*>(config.device_find(this, PCI_ID_VIDEO":voodoo"));
- voodoo_base->vblank_callback().set(FUNC(vegas_state::vblank_assert));
+ subdevice<voodoo_device>(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert));
// TL16C552 UART
NS16550(config, m_uart1, XTAL(1'843'200));
diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h
index ee9362e15ea..dc706024514 100644
--- a/src/mame/machine/midwayic.h
+++ b/src/mame/machine/midwayic.h
@@ -158,9 +158,6 @@ public:
void set_shuffle(uint8_t shuffle) { m_shuffle_type = shuffle; }
void set_shuffle_default(uint8_t shuffle) { m_shuffle_default = shuffle; }
void set_auto_ack(uint8_t auto_ack) { m_auto_ack = auto_ack; }
- template <class Object> devcb_base &set_irqhandler_callback(Object &&cb) { return m_irq_callback.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_serial_tx_callback(Object &&cb) { return m_serial_tx_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_aux_output_callback(Object &&cb) { return m_aux_output_cb.set_callback(std::forward<Object>(cb)); }
auto irq_handler() { return m_irq_callback.bind(); }
auto serial_tx_handler() { return m_serial_tx_cb.bind(); }
auto aux_output_handler() { return m_aux_output_cb.bind(); }