trunk/src/emu/machine/e05a03.h
| r0 | r30944 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | E05A03 Gate Array (used in the Epson LX-800) |
| 4 | |
| 5 | license: MAME, GPL-2.0+ |
| 6 | copyright-holders: Dirk Best |
| 7 | |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | #ifndef __E05A03_H__ |
| 11 | #define __E05A03_H__ |
| 12 | |
| 13 | /*************************************************************************** |
| 14 | DEVICE CONFIGURATION MACROS |
| 15 | ***************************************************************************/ |
| 16 | |
| 17 | #define MCFG_E05A03_NLQ_LP_CALLBACK(_write) \ |
| 18 | devcb = &e05a03_device::set_nlq_lp_wr_callback(*device, DEVCB_##_write); |
| 19 | |
| 20 | #define MCFG_E05A03_PE_LP_CALLBACK(_write) \ |
| 21 | devcb = &e05a03_device::set_pe_lp_wr_callback(*device, DEVCB_##_write); |
| 22 | |
| 23 | #define MCFG_E05A03_RESO_CALLBACK(_write) \ |
| 24 | devcb = &e05a03_device::set_reso_wr_callback(*device, DEVCB_##_write); |
| 25 | |
| 26 | #define MCFG_E05A03_PE_CALLBACK(_write) \ |
| 27 | devcb = &e05a03_device::set_pe_wr_callback(*device, DEVCB_##_write); |
| 28 | |
| 29 | #define MCFG_E05A03_DATA_CALLBACK(_read) \ |
| 30 | devcb = &e05a03_device::set_data_rd_callback(*device, DEVCB_##_read); |
| 31 | |
| 32 | |
| 33 | /*************************************************************************** |
| 34 | TYPE DEFINITIONS |
| 35 | ***************************************************************************/ |
| 36 | |
| 37 | class e05a03_device : public device_t |
| 38 | { |
| 39 | public: |
| 40 | e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 41 | ~e05a03_device() {} |
| 42 | |
| 43 | template<class _Object> static devcb_base &set_nlq_lp_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_nlq_lp.set_callback(object); } |
| 44 | template<class _Object> static devcb_base &set_pe_lp_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_pe_lp.set_callback(object); } |
| 45 | template<class _Object> static devcb_base &set_reso_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_reso.set_callback(object); } |
| 46 | template<class _Object> static devcb_base &set_pe_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_pe.set_callback(object); } |
| 47 | template<class _Object> static devcb_base &set_data_rd_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_read_data.set_callback(object); } |
| 48 | |
| 49 | DECLARE_WRITE8_MEMBER( write ); |
| 50 | DECLARE_READ8_MEMBER( read ); |
| 51 | |
| 52 | WRITE_LINE_MEMBER( home_w ); /* home position signal */ |
| 53 | WRITE_LINE_MEMBER( fire_w ); /* printhead solenoids trigger */ |
| 54 | WRITE_LINE_MEMBER( strobe_w ); |
| 55 | READ_LINE_MEMBER( busy_r ); |
| 56 | WRITE_LINE_MEMBER( resi_w ); /* reset input */ |
| 57 | WRITE_LINE_MEMBER( init_w ); /* centronics init */ |
| 58 | |
| 59 | protected: |
| 60 | // device-level overrides |
| 61 | virtual void device_start(); |
| 62 | virtual void device_reset(); |
| 63 | |
| 64 | private: |
| 65 | // internal state |
| 66 | /* callbacks */ |
| 67 | devcb_write_line m_write_nlq_lp; /* pin 2, nlq lamp output */ |
| 68 | devcb_write_line m_write_pe_lp; /* pin 3, paper empty lamp output */ |
| 69 | devcb_write_line m_write_reso; /* pin 25, reset output */ |
| 70 | devcb_write_line m_write_pe; /* pin 35, centronics pe output */ |
| 71 | devcb_read8 m_read_data; /* pin 47-54, centronics data input */ |
| 72 | |
| 73 | /* 24-bit shift register, port 0x00, 0x01 and 0x02 */ |
| 74 | UINT32 m_shift; |
| 75 | |
| 76 | /* port 0x03 */ |
| 77 | int m_busy_leading; |
| 78 | int m_busy_software; |
| 79 | int m_nlqlp; |
| 80 | int m_cndlp; |
| 81 | |
| 82 | #if 0 |
| 83 | int m_pe; |
| 84 | int m_pelp; |
| 85 | #endif |
| 86 | |
| 87 | /* port 0x04 and 0x05 (9-bit) */ |
| 88 | UINT16 m_printhead; |
| 89 | |
| 90 | /* port 0x06 (4-bit) */ |
| 91 | UINT8 m_pf_motor; |
| 92 | |
| 93 | /* port 0x07 (4-bit) */ |
| 94 | UINT8 m_cr_motor; |
| 95 | }; |
| 96 | |
| 97 | extern const device_type E05A03; |
| 98 | |
| 99 | |
| 100 | #endif /* __E05A03_H__ */ |
trunk/src/emu/machine/e05a03.c
| r0 | r30944 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | E05A03 Gate Array (used in the Epson LX-800) |
| 4 | |
| 5 | license: MAME, GPL-2.0+ |
| 6 | copyright-holders: Dirk Best |
| 7 | |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | #include "emu.h" |
| 11 | #include "e05a03.h" |
| 12 | |
| 13 | |
| 14 | /***************************************************************************** |
| 15 | DEVICE INTERFACE |
| 16 | *****************************************************************************/ |
| 17 | |
| 18 | const device_type E05A03 = &device_creator<e05a03_device>; |
| 19 | |
| 20 | e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 21 | : device_t(mconfig, E05A03, "E05A03", tag, owner, clock, "e05a03", __FILE__), |
| 22 | m_write_nlq_lp(*this), |
| 23 | m_write_pe_lp(*this), |
| 24 | m_write_reso(*this), |
| 25 | m_write_pe(*this), |
| 26 | m_read_data(*this), |
| 27 | m_shift(0), |
| 28 | m_busy_leading(0), |
| 29 | m_busy_software(0), |
| 30 | m_nlqlp(0), |
| 31 | m_cndlp(0), |
| 32 | #if 0 |
| 33 | m_pe(0), |
| 34 | m_pelp(0), |
| 35 | #endif |
| 36 | m_printhead(0), |
| 37 | m_pf_motor(0), |
| 38 | m_cr_motor(0) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | //------------------------------------------------- |
| 43 | // device_start - device-specific startup |
| 44 | //------------------------------------------------- |
| 45 | |
| 46 | void e05a03_device::device_start() |
| 47 | { |
| 48 | /* resolve callbacks */ |
| 49 | m_write_nlq_lp.resolve_safe(); |
| 50 | m_write_pe_lp.resolve_safe(); |
| 51 | m_write_reso.resolve_safe(); |
| 52 | m_write_pe.resolve_safe(); |
| 53 | m_read_data.resolve_safe(0); |
| 54 | |
| 55 | /* register for state saving */ |
| 56 | save_item(NAME(m_shift)); |
| 57 | save_item(NAME(m_busy_leading)); |
| 58 | save_item(NAME(m_busy_software)); |
| 59 | save_item(NAME(m_nlqlp)); |
| 60 | save_item(NAME(m_cndlp)); |
| 61 | #if 0 |
| 62 | save_item(NAME(m_pe)); |
| 63 | save_item(NAME(m_pelp)); |
| 64 | #endif |
| 65 | save_item(NAME(m_printhead)); |
| 66 | save_item(NAME(m_pf_motor)); |
| 67 | save_item(NAME(m_cr_motor)); |
| 68 | } |
| 69 | |
| 70 | //------------------------------------------------- |
| 71 | // device_reset - device-specific reset |
| 72 | //------------------------------------------------- |
| 73 | |
| 74 | void e05a03_device::device_reset() |
| 75 | { |
| 76 | m_printhead = 0x00; |
| 77 | m_pf_motor = 0x00; |
| 78 | m_cr_motor = 0x0f; |
| 79 | |
| 80 | m_write_pe(0); |
| 81 | m_write_pe_lp(1); |
| 82 | |
| 83 | m_busy_software = 1; |
| 84 | m_nlqlp = 1; |
| 85 | m_cndlp = 1; |
| 86 | } |
| 87 | |
| 88 | |
| 89 | |
| 90 | /*************************************************************************** |
| 91 | IMPLEMENTATION |
| 92 | ***************************************************************************/ |
| 93 | |
| 94 | WRITE8_MEMBER( e05a03_device::write ) |
| 95 | { |
| 96 | logerror("%s: e05a03_w(%02x): %02x\n", space.machine().describe_context(), offset, data); |
| 97 | |
| 98 | switch (offset) |
| 99 | { |
| 100 | /* shift register */ |
| 101 | case 0x00: m_shift = (m_shift & 0x00ffff) | (data << 16); break; |
| 102 | case 0x01: m_shift = (m_shift & 0xff00ff) | (data << 8); break; |
| 103 | case 0x02: m_shift = (m_shift & 0xffff00) | (data << 0); break; |
| 104 | |
| 105 | case 0x03: |
| 106 | m_busy_leading = BIT(data, 7); |
| 107 | m_busy_software = BIT(data, 6); |
| 108 | m_nlqlp = BIT(data, 4); |
| 109 | m_cndlp = BIT(data, 3); |
| 110 | |
| 111 | m_write_pe(BIT(data, 2)); |
| 112 | m_write_pe_lp(!BIT(data, 2)); |
| 113 | |
| 114 | #if 0 |
| 115 | m_pe = BIT(data, 2); |
| 116 | m_pelp = !BIT(data, 2); |
| 117 | #endif |
| 118 | |
| 119 | break; |
| 120 | |
| 121 | /* printhead */ |
| 122 | case 0x04: m_printhead = (m_printhead & 0x100) | !data; break; |
| 123 | case 0x05: m_printhead = (m_printhead & 0x0ff) | (!(BIT(data, 7) << 8)); break; |
| 124 | |
| 125 | /* paper feed and carriage motor phase data*/ |
| 126 | case 0x06: m_pf_motor = (data & 0xf0) >> 4; break; |
| 127 | case 0x07: m_cr_motor = (data & 0x0f) >> 0; break; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | READ8_MEMBER( e05a03_device::read ) |
| 132 | { |
| 133 | UINT8 result = 0; |
| 134 | |
| 135 | logerror("%s: e05a03_r(%02x)\n", space.machine().describe_context(), offset); |
| 136 | |
| 137 | switch (offset) |
| 138 | { |
| 139 | case 0x00: |
| 140 | break; |
| 141 | |
| 142 | case 0x01: |
| 143 | break; |
| 144 | |
| 145 | case 0x02: |
| 146 | result = m_read_data(0); |
| 147 | break; |
| 148 | |
| 149 | case 0x03: |
| 150 | result |= BIT(m_shift, 23) << 7; |
| 151 | m_shift <<= 1; |
| 152 | break; |
| 153 | } |
| 154 | |
| 155 | return result; |
| 156 | } |
| 157 | |
| 158 | /* home position signal */ |
| 159 | WRITE_LINE_MEMBER( e05a03_device::home_w ) |
| 160 | { |
| 161 | } |
| 162 | |
| 163 | /* printhead solenoids trigger */ |
| 164 | WRITE_LINE_MEMBER( e05a03_device::fire_w ) |
| 165 | { |
| 166 | } |
| 167 | |
| 168 | WRITE_LINE_MEMBER( e05a03_device::strobe_w ) |
| 169 | { |
| 170 | } |
| 171 | |
| 172 | READ_LINE_MEMBER( e05a03_device::busy_r ) |
| 173 | { |
| 174 | return 1; |
| 175 | } |
| 176 | |
| 177 | WRITE_LINE_MEMBER( e05a03_device::resi_w ) |
| 178 | { |
| 179 | if (!state) |
| 180 | { |
| 181 | device_reset(); |
| 182 | m_write_reso(1); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | WRITE_LINE_MEMBER( e05a03_device::init_w ) |
| 187 | { |
| 188 | resi_w(state); |
| 189 | } |
trunk/src/mess/machine/e05a03.c
| r30943 | r30944 | |
| 1 | | /*************************************************************************** |
| 2 | | |
| 3 | | E05A03 Gate Array (used in the Epson LX-800) |
| 4 | | |
| 5 | | license: MAME, GPL-2.0+ |
| 6 | | copyright-holders: Dirk Best |
| 7 | | |
| 8 | | ***************************************************************************/ |
| 9 | | |
| 10 | | #include "emu.h" |
| 11 | | #include "e05a03.h" |
| 12 | | |
| 13 | | |
| 14 | | /***************************************************************************** |
| 15 | | DEVICE INTERFACE |
| 16 | | *****************************************************************************/ |
| 17 | | |
| 18 | | const device_type E05A03 = &device_creator<e05a03_device>; |
| 19 | | |
| 20 | | e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 21 | | : device_t(mconfig, E05A03, "E05A03", tag, owner, clock, "e05a03", __FILE__), |
| 22 | | m_write_nlq_lp(*this), |
| 23 | | m_write_pe_lp(*this), |
| 24 | | m_write_reso(*this), |
| 25 | | m_write_pe(*this), |
| 26 | | m_read_data(*this), |
| 27 | | m_shift(0), |
| 28 | | m_busy_leading(0), |
| 29 | | m_busy_software(0), |
| 30 | | m_nlqlp(0), |
| 31 | | m_cndlp(0), |
| 32 | | #if 0 |
| 33 | | m_pe(0), |
| 34 | | m_pelp(0), |
| 35 | | #endif |
| 36 | | m_printhead(0), |
| 37 | | m_pf_motor(0), |
| 38 | | m_cr_motor(0) |
| 39 | | { |
| 40 | | } |
| 41 | | |
| 42 | | //------------------------------------------------- |
| 43 | | // device_start - device-specific startup |
| 44 | | //------------------------------------------------- |
| 45 | | |
| 46 | | void e05a03_device::device_start() |
| 47 | | { |
| 48 | | /* resolve callbacks */ |
| 49 | | m_write_nlq_lp.resolve_safe(); |
| 50 | | m_write_pe_lp.resolve_safe(); |
| 51 | | m_write_reso.resolve_safe(); |
| 52 | | m_write_pe.resolve_safe(); |
| 53 | | m_read_data.resolve_safe(0); |
| 54 | | |
| 55 | | /* register for state saving */ |
| 56 | | save_item(NAME(m_shift)); |
| 57 | | save_item(NAME(m_busy_leading)); |
| 58 | | save_item(NAME(m_busy_software)); |
| 59 | | save_item(NAME(m_nlqlp)); |
| 60 | | save_item(NAME(m_cndlp)); |
| 61 | | #if 0 |
| 62 | | save_item(NAME(m_pe)); |
| 63 | | save_item(NAME(m_pelp)); |
| 64 | | #endif |
| 65 | | save_item(NAME(m_printhead)); |
| 66 | | save_item(NAME(m_pf_motor)); |
| 67 | | save_item(NAME(m_cr_motor)); |
| 68 | | } |
| 69 | | |
| 70 | | //------------------------------------------------- |
| 71 | | // device_reset - device-specific reset |
| 72 | | //------------------------------------------------- |
| 73 | | |
| 74 | | void e05a03_device::device_reset() |
| 75 | | { |
| 76 | | m_printhead = 0x00; |
| 77 | | m_pf_motor = 0x00; |
| 78 | | m_cr_motor = 0x0f; |
| 79 | | |
| 80 | | m_write_pe(0); |
| 81 | | m_write_pe_lp(1); |
| 82 | | |
| 83 | | m_busy_software = 1; |
| 84 | | m_nlqlp = 1; |
| 85 | | m_cndlp = 1; |
| 86 | | } |
| 87 | | |
| 88 | | |
| 89 | | |
| 90 | | /*************************************************************************** |
| 91 | | IMPLEMENTATION |
| 92 | | ***************************************************************************/ |
| 93 | | |
| 94 | | WRITE8_MEMBER( e05a03_device::write ) |
| 95 | | { |
| 96 | | logerror("%s: e05a03_w(%02x): %02x\n", space.machine().describe_context(), offset, data); |
| 97 | | |
| 98 | | switch (offset) |
| 99 | | { |
| 100 | | /* shift register */ |
| 101 | | case 0x00: m_shift = (m_shift & 0x00ffff) | (data << 16); break; |
| 102 | | case 0x01: m_shift = (m_shift & 0xff00ff) | (data << 8); break; |
| 103 | | case 0x02: m_shift = (m_shift & 0xffff00) | (data << 0); break; |
| 104 | | |
| 105 | | case 0x03: |
| 106 | | m_busy_leading = BIT(data, 7); |
| 107 | | m_busy_software = BIT(data, 6); |
| 108 | | m_nlqlp = BIT(data, 4); |
| 109 | | m_cndlp = BIT(data, 3); |
| 110 | | |
| 111 | | m_write_pe(BIT(data, 2)); |
| 112 | | m_write_pe_lp(!BIT(data, 2)); |
| 113 | | |
| 114 | | #if 0 |
| 115 | | m_pe = BIT(data, 2); |
| 116 | | m_pelp = !BIT(data, 2); |
| 117 | | #endif |
| 118 | | |
| 119 | | break; |
| 120 | | |
| 121 | | /* printhead */ |
| 122 | | case 0x04: m_printhead = (m_printhead & 0x100) | !data; break; |
| 123 | | case 0x05: m_printhead = (m_printhead & 0x0ff) | (!(BIT(data, 7) << 8)); break; |
| 124 | | |
| 125 | | /* paper feed and carriage motor phase data*/ |
| 126 | | case 0x06: m_pf_motor = (data & 0xf0) >> 4; break; |
| 127 | | case 0x07: m_cr_motor = (data & 0x0f) >> 0; break; |
| 128 | | } |
| 129 | | } |
| 130 | | |
| 131 | | READ8_MEMBER( e05a03_device::read ) |
| 132 | | { |
| 133 | | UINT8 result = 0; |
| 134 | | |
| 135 | | logerror("%s: e05a03_r(%02x)\n", space.machine().describe_context(), offset); |
| 136 | | |
| 137 | | switch (offset) |
| 138 | | { |
| 139 | | case 0x00: |
| 140 | | break; |
| 141 | | |
| 142 | | case 0x01: |
| 143 | | break; |
| 144 | | |
| 145 | | case 0x02: |
| 146 | | result = m_read_data(0); |
| 147 | | break; |
| 148 | | |
| 149 | | case 0x03: |
| 150 | | result |= BIT(m_shift, 23) << 7; |
| 151 | | m_shift <<= 1; |
| 152 | | break; |
| 153 | | } |
| 154 | | |
| 155 | | return result; |
| 156 | | } |
| 157 | | |
| 158 | | /* home position signal */ |
| 159 | | WRITE_LINE_MEMBER( e05a03_device::home_w ) |
| 160 | | { |
| 161 | | } |
| 162 | | |
| 163 | | /* printhead solenoids trigger */ |
| 164 | | WRITE_LINE_MEMBER( e05a03_device::fire_w ) |
| 165 | | { |
| 166 | | } |
| 167 | | |
| 168 | | WRITE_LINE_MEMBER( e05a03_device::strobe_w ) |
| 169 | | { |
| 170 | | } |
| 171 | | |
| 172 | | READ_LINE_MEMBER( e05a03_device::busy_r ) |
| 173 | | { |
| 174 | | return 1; |
| 175 | | } |
| 176 | | |
| 177 | | WRITE_LINE_MEMBER( e05a03_device::resi_w ) |
| 178 | | { |
| 179 | | if (!state) |
| 180 | | { |
| 181 | | device_reset(); |
| 182 | | m_write_reso(1); |
| 183 | | } |
| 184 | | } |
| 185 | | |
| 186 | | WRITE_LINE_MEMBER( e05a03_device::init_w ) |
| 187 | | { |
| 188 | | resi_w(state); |
| 189 | | } |
trunk/src/mess/machine/e05a03.h
| r30943 | r30944 | |
| 1 | | /*************************************************************************** |
| 2 | | |
| 3 | | E05A03 Gate Array (used in the Epson LX-800) |
| 4 | | |
| 5 | | license: MAME, GPL-2.0+ |
| 6 | | copyright-holders: Dirk Best |
| 7 | | |
| 8 | | ***************************************************************************/ |
| 9 | | |
| 10 | | #ifndef __E05A03_H__ |
| 11 | | #define __E05A03_H__ |
| 12 | | |
| 13 | | /*************************************************************************** |
| 14 | | DEVICE CONFIGURATION MACROS |
| 15 | | ***************************************************************************/ |
| 16 | | |
| 17 | | #define MCFG_E05A03_NLQ_LP_CALLBACK(_write) \ |
| 18 | | devcb = &e05a03_device::set_nlq_lp_wr_callback(*device, DEVCB_##_write); |
| 19 | | |
| 20 | | #define MCFG_E05A03_PE_LP_CALLBACK(_write) \ |
| 21 | | devcb = &e05a03_device::set_pe_lp_wr_callback(*device, DEVCB_##_write); |
| 22 | | |
| 23 | | #define MCFG_E05A03_RESO_CALLBACK(_write) \ |
| 24 | | devcb = &e05a03_device::set_reso_wr_callback(*device, DEVCB_##_write); |
| 25 | | |
| 26 | | #define MCFG_E05A03_PE_CALLBACK(_write) \ |
| 27 | | devcb = &e05a03_device::set_pe_wr_callback(*device, DEVCB_##_write); |
| 28 | | |
| 29 | | #define MCFG_E05A03_DATA_CALLBACK(_read) \ |
| 30 | | devcb = &e05a03_device::set_data_rd_callback(*device, DEVCB_##_read); |
| 31 | | |
| 32 | | |
| 33 | | /*************************************************************************** |
| 34 | | TYPE DEFINITIONS |
| 35 | | ***************************************************************************/ |
| 36 | | |
| 37 | | class e05a03_device : public device_t |
| 38 | | { |
| 39 | | public: |
| 40 | | e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 41 | | ~e05a03_device() {} |
| 42 | | |
| 43 | | template<class _Object> static devcb_base &set_nlq_lp_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_nlq_lp.set_callback(object); } |
| 44 | | template<class _Object> static devcb_base &set_pe_lp_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_pe_lp.set_callback(object); } |
| 45 | | template<class _Object> static devcb_base &set_reso_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_reso.set_callback(object); } |
| 46 | | template<class _Object> static devcb_base &set_pe_wr_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_write_pe.set_callback(object); } |
| 47 | | template<class _Object> static devcb_base &set_data_rd_callback(device_t &device, _Object object) { return downcast<e05a03_device &>(device).m_read_data.set_callback(object); } |
| 48 | | |
| 49 | | DECLARE_WRITE8_MEMBER( write ); |
| 50 | | DECLARE_READ8_MEMBER( read ); |
| 51 | | |
| 52 | | WRITE_LINE_MEMBER( home_w ); /* home position signal */ |
| 53 | | WRITE_LINE_MEMBER( fire_w ); /* printhead solenoids trigger */ |
| 54 | | WRITE_LINE_MEMBER( strobe_w ); |
| 55 | | READ_LINE_MEMBER( busy_r ); |
| 56 | | WRITE_LINE_MEMBER( resi_w ); /* reset input */ |
| 57 | | WRITE_LINE_MEMBER( init_w ); /* centronics init */ |
| 58 | | |
| 59 | | protected: |
| 60 | | // device-level overrides |
| 61 | | virtual void device_start(); |
| 62 | | virtual void device_reset(); |
| 63 | | |
| 64 | | private: |
| 65 | | // internal state |
| 66 | | /* callbacks */ |
| 67 | | devcb_write_line m_write_nlq_lp; /* pin 2, nlq lamp output */ |
| 68 | | devcb_write_line m_write_pe_lp; /* pin 3, paper empty lamp output */ |
| 69 | | devcb_write_line m_write_reso; /* pin 25, reset output */ |
| 70 | | devcb_write_line m_write_pe; /* pin 35, centronics pe output */ |
| 71 | | devcb_read8 m_read_data; /* pin 47-54, centronics data input */ |
| 72 | | |
| 73 | | /* 24-bit shift register, port 0x00, 0x01 and 0x02 */ |
| 74 | | UINT32 m_shift; |
| 75 | | |
| 76 | | /* port 0x03 */ |
| 77 | | int m_busy_leading; |
| 78 | | int m_busy_software; |
| 79 | | int m_nlqlp; |
| 80 | | int m_cndlp; |
| 81 | | |
| 82 | | #if 0 |
| 83 | | int m_pe; |
| 84 | | int m_pelp; |
| 85 | | #endif |
| 86 | | |
| 87 | | /* port 0x04 and 0x05 (9-bit) */ |
| 88 | | UINT16 m_printhead; |
| 89 | | |
| 90 | | /* port 0x06 (4-bit) */ |
| 91 | | UINT8 m_pf_motor; |
| 92 | | |
| 93 | | /* port 0x07 (4-bit) */ |
| 94 | | UINT8 m_cr_motor; |
| 95 | | }; |
| 96 | | |
| 97 | | extern const device_type E05A03; |
| 98 | | |
| 99 | | |
| 100 | | #endif /* __E05A03_H__ */ |