diff options
Diffstat (limited to 'src/devices/bus/ti8x/bitsocket.h')
-rw-r--r-- | src/devices/bus/ti8x/bitsocket.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/devices/bus/ti8x/bitsocket.h b/src/devices/bus/ti8x/bitsocket.h new file mode 100644 index 00000000000..f4c635c9dfc --- /dev/null +++ b/src/devices/bus/ti8x/bitsocket.h @@ -0,0 +1,55 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +/* + Sends raw assert/release signals over a socket. Seriously limits + transfer rates and probably won't work if there's much latency, but it + allows communication between instances using non-standard protocols. + + bit 0 = data + bit 1 = set tip + bit 2 = set ring + */ +#ifndef MAME_DEVICES_BUS_TI8X_BITSOCKET_H +#define MAME_DEVICES_BUS_TI8X_BITSOCKET_H + +#pragma once + +#include "ti8x.h" + +#include "imagedev/bitbngr.h" + + +extern device_type const TI8X_BIT_SOCKET; + + +namespace bus { namespace ti8x { + +class bit_socket_device + : public device_t + , public device_ti8x_link_port_interface +{ +public: + bit_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + +protected: + enum + { + TIMER_ID_POLL = 1 + }; + + virtual machine_config_constructor device_mconfig_additions() const override; + virtual void device_start() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + + virtual DECLARE_WRITE_LINE_MEMBER(input_tip) override; + virtual DECLARE_WRITE_LINE_MEMBER(input_ring) override; + +private: + required_device<bitbanger_device> m_stream; + emu_timer * m_poll_timer; + bool m_tip_in, m_ring_in; +}; + +} } // namespace bus::ti8x + +#endif // MAME_DEVICES_BUS_TI8X_BITSOCKET_H
\ No newline at end of file |