summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/e05a03.h
blob: 2e23a7551af9fc0a32c16af7fc508f65c7945853 (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
/***************************************************************************

    E05A03 Gate Array (used in the Epson LX-800)

***************************************************************************/

#ifndef __E05A03_H__
#define __E05A03_H__

#include "devcb.h"


/***************************************************************************
    TYPE DEFINITIONS
***************************************************************************/

struct e05a03_interface
{
	devcb_read8 in_data_func;

	devcb_write_line out_nlq_lp_func;
	devcb_write_line out_pe_lp_func;
	devcb_write_line out_pe_func;
	devcb_write_line out_reso_func;
};


/***************************************************************************
    FUNCTION PROTOTYPES
***************************************************************************/
DECLARE_WRITE8_DEVICE_HANDLER( e05a03_w );
DECLARE_READ8_DEVICE_HANDLER( e05a03_r );

WRITE_LINE_DEVICE_HANDLER( e05a03_home_w ); /* home position signal */
WRITE_LINE_DEVICE_HANDLER( e05a03_fire_w ); /* printhead solenoids trigger */
WRITE_LINE_DEVICE_HANDLER( e05a03_strobe_w );
READ_LINE_DEVICE_HANDLER( e05a03_busy_r );
WRITE_LINE_DEVICE_HANDLER( e05a03_resi_w ); /* reset input */
WRITE_LINE_DEVICE_HANDLER( e05a03_init_w ); /* centronics init */


/***************************************************************************
    DEVICE CONFIGURATION MACROS
***************************************************************************/

class e05a03_device : public device_t
{
public:
	e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	~e05a03_device() { global_free(m_token); }

	// access to legacy token
	void *token() const { assert(m_token != NULL); return m_token; }
protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset();
private:
	// internal state
	void *m_token;
};

extern const device_type E05A03;


#define MCFG_E05A03_ADD(_tag, _intf) \
	MCFG_DEVICE_ADD(_tag, E05A03, 0) \
	MCFG_DEVICE_CONFIG(_intf)


#endif /* __E05A03_H__ */