migrate TI-8x bus devices to machine config in members (nw)

This commit is contained in:
Vas Crabb 2017-05-25 01:16:04 +10:00
parent 02e20545e7
commit a1e83106ad
8 changed files with 41 additions and 87 deletions

View File

@ -10,15 +10,6 @@ DEFINE_DEVICE_TYPE_NS(TI8X_BIT_SOCKET, bus::ti8x, bit_socket_device, "ti8x_bitso
namespace bus { namespace ti8x {
namespace {
MACHINE_CONFIG_START(bit_socket)
MCFG_DEVICE_ADD("stream", BITBANGER, 0)
MACHINE_CONFIG_END
} // anonymous namespace
bit_socket_device::bit_socket_device(
machine_config const &mconfig,
char const *tag,
@ -34,10 +25,9 @@ bit_socket_device::bit_socket_device(
}
machine_config_constructor bit_socket_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(bit_socket);
}
MACHINE_CONFIG_MEMBER(bit_socket_device::device_add_mconfig)
MCFG_DEVICE_ADD("stream", BITBANGER, 0)
MACHINE_CONFIG_END
void bit_socket_device::device_start()

View File

@ -34,7 +34,7 @@ protected:
TIMER_ID_POLL = 1
};
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;

View File

@ -10,16 +10,6 @@ DEFINE_DEVICE_TYPE_NS(TI8X_GRAPH_LINK_HLE, bus::ti8x, graph_link_hle_device, "ti
namespace bus { namespace ti8x {
namespace {
MACHINE_CONFIG_START(graph_link_hle)
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(graph_link_hle_device, rx_w))
MACHINE_CONFIG_END
} // anonymous namespace
graph_link_hle_device::graph_link_hle_device(
machine_config const &mconfig,
char const *tag,
@ -68,10 +58,10 @@ void graph_link_hle_device::device_timer(emu_timer &timer, device_timer_id id, i
}
machine_config_constructor graph_link_hle_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(graph_link_hle);
}
MACHINE_CONFIG_MEMBER(graph_link_hle_device::device_add_mconfig)
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(graph_link_hle_device, rx_w))
MACHINE_CONFIG_END
void graph_link_hle_device::byte_collision()

View File

@ -34,7 +34,7 @@ public:
graph_link_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;

View File

@ -10,21 +10,6 @@ DEFINE_DEVICE_TYPE_NS(TI8X_TEE_CONNECTOR, bus::ti8x, tee_connector_device, "it8x
namespace bus { namespace ti8x {
namespace {
MACHINE_CONFIG_START(tee_connector)
MCFG_TI8X_LINK_PORT_ADD("a", default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(tee_connector_device, tip_a_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(tee_connector_device, ring_a_w))
MCFG_TI8X_LINK_PORT_ADD("b", default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(tee_connector_device, tip_b_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(tee_connector_device, ring_b_w))
MACHINE_CONFIG_END
} // anonymous namespace
tee_connector_device::tee_connector_device(
machine_config const &mconfig,
char const *tag,
@ -76,10 +61,15 @@ WRITE_LINE_MEMBER(tee_connector_device::ring_b_w)
}
machine_config_constructor tee_connector_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(tee_connector);
}
MACHINE_CONFIG_MEMBER(tee_connector_device::device_add_mconfig)
MCFG_TI8X_LINK_PORT_ADD("a", default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(tee_connector_device, tip_a_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(tee_connector_device, ring_a_w))
MCFG_TI8X_LINK_PORT_ADD("b", default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(tee_connector_device, tip_b_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(tee_connector_device, ring_b_w))
MACHINE_CONFIG_END
void tee_connector_device::device_start()

View File

@ -18,18 +18,18 @@ class tee_connector_device : public device_t, public device_ti8x_link_port_inter
public:
tee_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE_LINE_MEMBER(tip_a_w);
DECLARE_WRITE_LINE_MEMBER(ring_a_w);
DECLARE_WRITE_LINE_MEMBER(tip_b_w);
DECLARE_WRITE_LINE_MEMBER(ring_b_w);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual DECLARE_WRITE_LINE_MEMBER(input_tip) override;
virtual DECLARE_WRITE_LINE_MEMBER(input_ring) override;
DECLARE_WRITE_LINE_MEMBER(tip_a_w);
DECLARE_WRITE_LINE_MEMBER(ring_a_w);
DECLARE_WRITE_LINE_MEMBER(tip_b_w);
DECLARE_WRITE_LINE_MEMBER(ring_b_w);
required_device<ti8x_link_port_device> m_port_a;
required_device<ti8x_link_port_device> m_port_b;

View File

@ -13,29 +13,6 @@ DEFINE_DEVICE_TYPE_NS(TI8X_SPEAKER_MONO, bus::ti8x, mono_speaker_device, "ti
namespace bus { namespace ti8x {
namespace {
MACHINE_CONFIG_START(ti_speaker_stereo)
MCFG_SPEAKER_STANDARD_STEREO("outl", "outr")
MCFG_SOUND_ADD("lspkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "outl", 0.50)
MCFG_SOUND_ADD("rspkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "outr", 0.50)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(ti_speaker_mono)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("spkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
} // anonymous namespace
stereo_speaker_device::stereo_speaker_device(
machine_config const &mconfig,
char const *tag,
@ -49,10 +26,15 @@ stereo_speaker_device::stereo_speaker_device(
}
machine_config_constructor stereo_speaker_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(ti_speaker_stereo);
}
MACHINE_CONFIG_MEMBER(stereo_speaker_device::device_add_mconfig)
MCFG_SPEAKER_STANDARD_STEREO("outl", "outr")
MCFG_SOUND_ADD("lspkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "outl", 0.50)
MCFG_SOUND_ADD("rspkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "outr", 0.50)
MACHINE_CONFIG_END
void stereo_speaker_device::device_start()
@ -87,10 +69,12 @@ mono_speaker_device::mono_speaker_device(
}
machine_config_constructor mono_speaker_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(ti_speaker_mono);
}
MACHINE_CONFIG_MEMBER(mono_speaker_device::device_add_mconfig)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("spkr", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
void mono_speaker_device::device_start()

View File

@ -17,7 +17,7 @@ public:
stereo_speaker_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual DECLARE_WRITE_LINE_MEMBER(input_tip) override;
@ -34,7 +34,7 @@ public:
mono_speaker_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual DECLARE_WRITE_LINE_MEMBER(input_tip) override;