diff options
author | Vas Crabb <vas@vastheman.com> | 2017-05-25 01:16:04 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2017-05-25 01:16:04 +1000 |
commit | a1e83106ad0943aff288b91e8daa9c8bf3151e0e (patch) | |
tree | 4cbbb8be6c533f782e38b029d756e4937cf43e1d | |
parent | 02e20545e7950e7a75a1750dadba76b8161d0827 (diff) |
migrate TI-8x bus devices to machine config in members (nw)
-rw-r--r-- | src/devices/bus/ti8x/bitsocket.cpp | 16 | ||||
-rw-r--r-- | src/devices/bus/ti8x/bitsocket.h | 2 | ||||
-rw-r--r-- | src/devices/bus/ti8x/graphlinkhle.cpp | 18 | ||||
-rw-r--r-- | src/devices/bus/ti8x/graphlinkhle.h | 2 | ||||
-rw-r--r-- | src/devices/bus/ti8x/teeconn.cpp | 28 | ||||
-rw-r--r-- | src/devices/bus/ti8x/teeconn.h | 12 | ||||
-rw-r--r-- | src/devices/bus/ti8x/tispeaker.cpp | 46 | ||||
-rw-r--r-- | src/devices/bus/ti8x/tispeaker.h | 4 |
8 files changed, 41 insertions, 87 deletions
diff --git a/src/devices/bus/ti8x/bitsocket.cpp b/src/devices/bus/ti8x/bitsocket.cpp index 592743120db..982a3354580 100644 --- a/src/devices/bus/ti8x/bitsocket.cpp +++ b/src/devices/bus/ti8x/bitsocket.cpp @@ -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() diff --git a/src/devices/bus/ti8x/bitsocket.h b/src/devices/bus/ti8x/bitsocket.h index 1d1f37c0add..b8729a6c00d 100644 --- a/src/devices/bus/ti8x/bitsocket.h +++ b/src/devices/bus/ti8x/bitsocket.h @@ -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; diff --git a/src/devices/bus/ti8x/graphlinkhle.cpp b/src/devices/bus/ti8x/graphlinkhle.cpp index 7a0b2e0a87b..8a77ff826ff 100644 --- a/src/devices/bus/ti8x/graphlinkhle.cpp +++ b/src/devices/bus/ti8x/graphlinkhle.cpp @@ -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() diff --git a/src/devices/bus/ti8x/graphlinkhle.h b/src/devices/bus/ti8x/graphlinkhle.h index 6959d5b336e..5e574374cab 100644 --- a/src/devices/bus/ti8x/graphlinkhle.h +++ b/src/devices/bus/ti8x/graphlinkhle.h @@ -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; diff --git a/src/devices/bus/ti8x/teeconn.cpp b/src/devices/bus/ti8x/teeconn.cpp index 0c203229758..2b88d37853c 100644 --- a/src/devices/bus/ti8x/teeconn.cpp +++ b/src/devices/bus/ti8x/teeconn.cpp @@ -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() diff --git a/src/devices/bus/ti8x/teeconn.h b/src/devices/bus/ti8x/teeconn.h index 50d9c87c37e..65ffa1c6d81 100644 --- a/src/devices/bus/ti8x/teeconn.h +++ b/src/devices/bus/ti8x/teeconn.h @@ -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; diff --git a/src/devices/bus/ti8x/tispeaker.cpp b/src/devices/bus/ti8x/tispeaker.cpp index 850f28cfc0d..867a2ad1939 100644 --- a/src/devices/bus/ti8x/tispeaker.cpp +++ b/src/devices/bus/ti8x/tispeaker.cpp @@ -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() diff --git a/src/devices/bus/ti8x/tispeaker.h b/src/devices/bus/ti8x/tispeaker.h index 1ee519f87e7..157c94ab060 100644 --- a/src/devices/bus/ti8x/tispeaker.h +++ b/src/devices/bus/ti8x/tispeaker.h @@ -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; |