1 // license:BSD-3-Clause
2 // copyright-holders:Vas Crabb
3 /*
4 Intel imm6-76 PROM programmer
5 
6 Simple programmer for 1602/1702 and 1602A/1702A 256x8 static PMOS
7 UVEPROMs (1602/1602A have a metal lid preventing erasure but are
8 otherwise identical to 1702/1702A). Used in the INTELLEC® 4 and
9 INTELLEC® 8 development systems.
10 
11 P1 universal edge connector (only used for power)
12 
13                   1    2
14            GND    3    4  GND
15                   5    6
16                   7    8
17                   9   10
18                  11   12
19                  13   14
20                  15   16
21                  17   18
22                  19   20
23                  21   22
24                  23   24
25                  25   26
26                  27   28
27                  29   30
28                  31   32
29                  33   34
30                  35   36
31                  37   38
32                  39   40
33                  41   42
34           -10V   43   44  -10V
35                  45   46
36                  47   48
37                  49   50
38                  51   52
39                  53   54
40                  55   56
41                  57   58
42                  59   60
43                  61   62
44                  63   64
45                  65   66
46                  67   68
47                  69   70
48                  71   72
49                  73   74
50                  75   76
51                  77   78
52                  79   80
53                  81   82
54                  83   84
55                  85   86
56                  87   88
57                  89   90
58                  91   92
59                  93   94
60                  95   96
61                  97   98
62            +5V   99  100  +5V
63 
64 
65 J1 40-pin IDC connector (data/control)
66 
67            DI1    1    2  A0
68            DI2    3    4  A1
69            DI3    5    6  A2
70            DI4    7    8  A3
71            DI5    9   10  A4
72            DI6   11   12  A5
73            DI7   13   14  A6
74            DI8   15   16  A7
75            DO1   17   18
76            DO2   19   20
77            DO3   21   22
78            DO4   23   24  DATA OUT ENABLE
79            DO5   25   26  DATA IN + TRUE
80            DO6   27   28  /DATA OUT + TRUE
81            DO7   29   30  R/W (1702)
82            DO8   31   32  R/W A (1702A)
83            GND   33   34  GND
84            GND   35   36  GND
85            GND   37   38  GND
86            GND   39   40  GND
87 
88 
89 J2 40-pin IDC connector (to PROM socket)
90 
91             D1    1    2  A0
92             D2    3    4  A1
93             D3    5    6  A2
94             D4    7    8  A3
95             D5    9   10  A4
96             D6   11   11  A5
97             D7   13   12  A6
98             D8   15   16  A7
99            GND   17   18  GND
100           Vccs   19   20  Vccs
101            Vdd   21   22  Vdd
102            Vgg   23   24  /CS
103            Vbb   25   26  PRGM
104                  27   28
105                  29   30
106                  31   32
107            GND   33   34  GND
108                  35   36
109                  37   38
110                  39   40
111 
112 
113 J3 Six-pin connector on flying leads
114 
115         50V AC    1    2
116         50V AC    3    4  +80V DC
117 /PRGM PROM PWR    5    6  GND
118 
119 
120 DO are open-collector TTL outputs with 5.6kΩ pullups.
121 
122 DATA OUT ENABLE has an onboard 5.6kΩ pullup. Driving it low disables DO
123 outputs.
124 
125 DATA IN + TRUE (if jumpered in) has a 5.6kΩ pullup and is XORed with the
126 DI inputs.  It should be pulled low in systems that use negative logic.
127 It is not jumpered in when used with INTELLEC 4 or INTELLEC 8 systems.
128 
129 /DATA OUT + TRUE (if jumpered in) has a 5.6kΩ and is XORed with the PROM
130 data outputs.  It should be pulled low in systems that use positive
131 logic.  It is not jumpered in when used with INTELLEC 4 or INTELLEC 8
132 systems, the line is tied low with an onboard jumper.
133 
134 /PRGM PROM PWR has a 27kΩ pullup to +80V DC and must be pulled low (to
135 GND) for programming voltage to be applied to the PROM.
136 
137 When pulled low, R/W initiates a 2% programming duty cycle for writing
138 to a 1602 or 1702 PROM (150 millisecond cycle time).
139 
140 When pulled low, RW A initiates a 20% programming duty cycle for writing
141 to a 1602A or 1702A PROM (15 millisecond cycle time).
142 */
143 #ifndef MAME_MACHINE_IMM6_76_H
144 #define MAME_MACHINE_IMM6_76_H
145 
146 #pragma once
147 
148 
149 class intel_imm6_76_device : public device_t, public device_image_interface
150 {
151 public:
152 	intel_imm6_76_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
153 
154 	// device_image_interface implementation
155 	virtual image_init_result call_load() override;
156 	virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override;
157 	virtual void call_unload() override;
158 
159 	// device_image_interface static info
image_type()160 	virtual iodevice_t  image_type()                            const noexcept override { return IO_ROM; }
is_readable()161 	virtual bool        is_readable()                           const noexcept override { return true; }
is_writeable()162 	virtual bool        is_writeable()                          const noexcept override { return true; }
is_creatable()163 	virtual bool        is_creatable()                          const noexcept override { return true; }
must_be_loaded()164 	virtual bool        must_be_loaded()                        const noexcept override { return false; }
is_reset_on_load()165 	virtual bool        is_reset_on_load()                      const noexcept override { return false; }
support_command_line_image_creation()166 	virtual bool        support_command_line_image_creation()   const noexcept override { return true; }
file_extensions()167 	virtual char const *file_extensions()                       const noexcept override { return "rom,bin"; }
custom_instance_name()168 	virtual char const *custom_instance_name()                  const noexcept override { return "promimage"; }
custom_brief_instance_name()169 	virtual char const *custom_brief_instance_name()            const noexcept override { return "prom"; }
170 
171 	void di_w(u8 data);
172 	void a_w(u8 data);
173 	u8 do_r() const;
174 	DECLARE_WRITE_LINE_MEMBER(data_out_enable);     // 1 = asserted
175 	DECLARE_WRITE_LINE_MEMBER(data_in_positive);    // 1 = asserted
176 	DECLARE_WRITE_LINE_MEMBER(data_out_positive);   // 0 = asserted
177 	DECLARE_WRITE_LINE_MEMBER(r_w);                 // 1 = read, 0 = write
178 	DECLARE_WRITE_LINE_MEMBER(r_w_a);               // 1 = read, 0 = write
179 	DECLARE_WRITE_LINE_MEMBER(prgm_prom_pwr);       // 0 = asserted
180 
181 protected:
182 	// device_t implementation
183 	virtual void device_start() override;
184 
185 private:
186 	TIMER_CALLBACK_MEMBER(cycle_expired);
187 	TIMER_CALLBACK_MEMBER(cycle_a_expired);
188 	TIMER_CALLBACK_MEMBER(prg_expired);
189 
190 	void trigger_prg();
191 
192 	emu_timer   *m_cycle_tmr, *m_cycle_a_tmr, *m_prg_tmr;
193 
194 	u8      m_data[256];
195 	u8      m_di, m_a;
196 	bool    m_do_enable, m_di_pos, m_do_pos;
197 	bool    m_r_w, m_r_w_a;
198 	bool    m_prgm_pwr;
199 	bool    m_cycle, m_cycle_a, m_prg;
200 };
201 
202 DECLARE_DEVICE_TYPE(INTEL_IMM6_76, intel_imm6_76_device)
203 
204 #endif // MAME_MACHINE_IMM6_76_H
205