1 // license:BSD-3-Clause
2 // copyright-holders:Curt Coder
3 /**********************************************************************
4 
5     MOS 8726R1 DMA Controller emulation
6 
7 **********************************************************************
8                             _____   _____
9                 /RESET   1 |*    \_/     | 64  Vcc
10                   /IRQ   2 |             | 63  BS
11                 DOTCLK   3 |             | 62  CAS1
12                    R/W   4 |             | 61  CAS0
13                  1 MHz   5 |             | 60  RAS1
14                    /CS   6 |             | 59  RAS0
15                    /BA   7 |             | 58  /DWE
16                   /DMA   8 |             | 57  DD0
17                     D7   9 |             | 56  DD1
18                     D6  10 |             | 55  DD2
19                     D5  11 |             | 54  DD3
20                     D4  12 |             | 53  DD4
21                     D3  13 |             | 52  DD5
22                     D2  14 |             | 51  DD6
23                     D1  15 |   MOS8726   | 50  DD7
24                     D0  16 |  MOS8726R1  | 49  Vss
25                    Vss  17 |             | 48  MA8
26                    A15  18 |             | 47  MA7
27                    A14  19 |             | 46  MA6
28                    A13  20 |             | 45  MA5
29                    A12  21 |             | 44  MA4
30                    A11  22 |             | 43  MA3
31                    A10  23 |             | 42  MA2
32                     A9  24 |             | 41  MA1
33                     A8  25 |             | 40  MA0
34                     A7  26 |             | 39  TEST
35                     A6  27 |             | 38  Vss
36                     A5  28 |             | 37  Vcc
37                     A4  29 |             | 36  /ROMSEL
38                     A3  30 |             | 35  /ROML
39                     A2  31 |             | 34  /ROMH
40                     A1  32 |_____________| 33  A0
41 
42 **********************************************************************/
43 
44 #ifndef MAME_MACHINE_MOS8726_H
45 #define MAME_MACHINE_MOS8726_H
46 
47 #pragma once
48 
49 
50 //**************************************************************************
51 //  TYPE DEFINITIONS
52 //**************************************************************************
53 
54 // ======================> mos8726_device
55 
56 class mos8726_device :  public device_t,
57 						public device_execute_interface
58 {
59 public:
60 	// construction/destruction
61 	mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
62 
63 	uint8_t read(offs_t offset);
64 	void write(offs_t offset, uint8_t data);
65 
66 	DECLARE_WRITE_LINE_MEMBER( bs_w );
67 
68 	int romsel_r(int roml, int romh);
69 
70 protected:
71 	// device-level overrides
72 	virtual void device_start() override;
73 	virtual void device_reset() override;
74 	virtual void execute_run() override;
75 
76 	int m_icount;
77 	int m_bs;
78 };
79 
80 
81 // device type definition
82 DECLARE_DEVICE_TYPE(MOS8726, mos8726_device)
83 
84 #endif // MAME_MACHINE_MOS8726_H
85