diff options
Diffstat (limited to 'src/emu/bus/rs232/xvd701.h')
-rw-r--r-- | src/emu/bus/rs232/xvd701.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/emu/bus/rs232/xvd701.h b/src/emu/bus/rs232/xvd701.h new file mode 100644 index 00000000000..6c03b0c4710 --- /dev/null +++ b/src/emu/bus/rs232/xvd701.h @@ -0,0 +1,42 @@ +#ifndef JVC_XV701_H_ +#define JVC_XV701_H_ + +#include "rs232.h" + +class jvc_xvd701_device : public device_t, + public device_serial_interface, + public device_rs232_port_interface +{ +public: + jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual WRITE_LINE_MEMBER( input_txd ) { device_serial_interface::rx_w(state); } + + DECLARE_WRITE_LINE_MEMBER(update_serial); + +protected: + virtual ioport_constructor device_input_ports() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + + virtual void tra_callback(); + virtual void tra_complete(); + virtual void rcv_complete(); + +private: + static const int TIMER_RESPONSE = 1; + + void send_response(); + unsigned char sum(unsigned char *buffer, int length); + + unsigned char m_command[11]; + unsigned char m_response[11]; + int m_response_index; + emu_timer *m_timer_response; +}; + +extern const device_type JVC_XVD701; + +#endif |