blob: d608d56fb9defb93e13ab44123ee16c41848b5cb (
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
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
#ifndef MAME_BUS_COCO_COCO_DWSOCKH_H
#define MAME_BUS_COCO_COCO_DWSOCKH_H
#include "osdfile.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, const char *tag, device_t *owner, const XTAL &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);
u8 read(offs_t offset);
void write(offs_t offset, u8 data);
// 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::ptr m_pSocket;
unsigned int m_rx_pending;
unsigned int m_head;
char m_buf[0x80];
};
// device type definition
DECLARE_DEVICE_TYPE(COCO_DWSOCK, beckerport_device)
// device iterator
typedef device_type_enumerator<beckerport_device> beckerport_device_enumerator;
#endif // MAME_BUS_COCO_COCO_DWSOCKH_H
|