cleanup, follow-up, fixup - remember to use debug builds when doing bulk conversions to catch bad downcasts and other asserts (nw)
This commit is contained in:
parent
2e3ccabfc0
commit
b6b299b566
@ -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;
|
||||
|
@ -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(); }
|
||||
|
||||
|
@ -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; };
|
||||
|
@ -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(); }
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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(); }
|
||||
|
Loading…
Reference in New Issue
Block a user