blob: 87cbd5fb7070bd6ee31716846f34dd3aaf2b1eab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
#ifndef _DWSOCK_H_
#define _DWSOCK_H_
#include "emu.h"
#include "osdcore.h"
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
#define DRIVEWIRE_PORT_TAG "drivewire_port"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> beckerport_device
class beckerport_device : public device_t
{
public:
beckerport_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock);
virtual ~beckerport_device();
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
virtual void device_start(void) override;
virtual void device_stop(void) override;
virtual void device_config_complete(void) override;
void update_port(void);
// driver update handlers
DECLARE_INPUT_CHANGED_MEMBER(drivewire_port_changed);
virtual DECLARE_READ8_MEMBER(read);
virtual DECLARE_WRITE8_MEMBER(write);
// types
enum dwsock_ports {
DWS_STATUS,
DWS_DATA
};
private:
/* IP hostname */
const char * m_hostname;
/* IP port */
required_ioport m_dwconfigport;
int m_dwtcpport;
osd_file *m_pSocket;
unsigned int m_rx_pending;
unsigned int m_head;
char m_buf[0x80];
};
// device type definition
extern const device_type COCO_DWSOCK;
// device iterator
typedef device_type_iterator<&device_creator<beckerport_device>, beckerport_device> beckerport_device_iterator;
#endif /* _DWSOCK_H_ */
|