1 // license:BSD-3-Clause
2 // copyright-holders:AJR
3 /***************************************************************************
4 
5     DEC DC305 Printer Controller
6 
7 ****************************************************************************
8                             _____   _____
9                    VSS   1 |*    \_/     | 40  A0
10                    INT   2 |             | 39  A1
11                  RESET   3 |             | 38  WR
12                    CLK   4 |             | 37  RD
13                    VCC   5 |             | 36  INTA
14                    CH1   6 |             | 35  CS
15                    CH2   7 |             | 34  D0
16                  MINUS   8 |             | 33  D1
17                   PLUS   9 |             | 32  D2
18                   BELL  10 |             | 31  D3
19                    RUN  11 |    DC305    | 30  D4
20                    LF2  12 |             | 29  D5
21                    LF1  13 |             | 28  D6
22                    RXC  14 |             | 27  D7
23                    TXC  15 |             | 26  S2
24                    S11  16 |             | 25  S4
25                     S9  17 |             | 24  S6
26                     S7  18 |             | 23  S8
27                     S5  19 |             | 22  S10
28                     S3  20 |_____________| 21  S1
29 
30 ***************************************************************************/
31 
32 #ifndef MAME_MACHINE_DC305_H
33 #define MAME_MACHINE_DC305_H
34 
35 #pragma once
36 
37 //**************************************************************************
38 //  TYPE DEFINITIONS
39 //**************************************************************************
40 
41 // ======================> dc305_device
42 
43 class dc305_device : public device_t
44 {
45 public:
46 	// construction/destruction
47 	dc305_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
48 
49 	// configuration
int_callback()50 	auto int_callback() { return m_int_callback.bind(); }
rxc_callback()51 	auto rxc_callback() { return m_rxc_callback.bind(); }
txc_callback()52 	auto txc_callback() { return m_txc_callback.bind(); }
53 
54 	// CPU read/write handlers
55 	u8 read(offs_t offset);
56 	void write(offs_t offset, u8 data);
57 	u8 inta();
58 
59 protected:
60 	// device-specific overrides
61 	virtual void device_resolve_objects() override;
62 	virtual void device_start() override;
63 	virtual void device_reset() override;
64 
65 private:
66 	// callback objects
67 	devcb_write_line m_int_callback;
68 	devcb_write_line m_rxc_callback;
69 	devcb_write_line m_txc_callback;
70 };
71 
72 // device type declaration
73 DECLARE_DEVICE_TYPE(DC305, dc305_device)
74 
75 #endif // MAME_MACHINE_DC305_H
76