src/mess/machine/esqvfd.c
| r15339 | r15340 | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include "esqvfd.h" |
| 7 | #include "esq1by22.lh" |
| 7 | 8 | #include "esq2by40.lh" |
| 8 | 9 | |
| 10 | const device_type ESQ1x22 = &device_creator<esq1x22_t>; |
| 9 | 11 | const device_type ESQ2x40 = &device_creator<esq2x40_t>; |
| 12 | const device_type ESQ2x40_SQ1 = &device_creator<esq2x40_sq1_t>; |
| 10 | 13 | |
| 11 | 14 | // adapted from bfm_bd1, rearranged to work with ASCII data used by the Ensoniq h/w |
| 12 | 15 | static const UINT16 font[]= |
| r15339 | r15340 | |
| 89 | 92 | void esqvfd_t::device_reset() |
| 90 | 93 | { |
| 91 | 94 | m_cursx = m_cursy = 0; |
| 92 | | memset(m_chars, ' ', sizeof(m_chars)); |
| 95 | m_curattr = AT_NORMAL; |
| 96 | memset(m_chars, 0, sizeof(m_chars)); |
| 93 | 97 | memset(m_attrs, 0, sizeof(m_attrs)); |
| 98 | memset(m_dirty, 1, sizeof(m_attrs)); |
| 94 | 99 | } |
| 95 | 100 | |
| 96 | 101 | void esqvfd_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| r15339 | r15340 | |
| 121 | 126 | return segout; |
| 122 | 127 | } |
| 123 | 128 | |
| 129 | // generic display update; can override from child classes if not good enough |
| 130 | void esqvfd_t::update_display() |
| 131 | { |
| 132 | for (int row = 0; row < m_rows; row++) |
| 133 | { |
| 134 | for (int col = 0; col < m_cols; col++) |
| 135 | { |
| 136 | if (m_dirty[row][col]) |
| 137 | { |
| 138 | UINT32 segdata = conv_segments(font[m_chars[row][col]]); |
| 139 | |
| 140 | output_set_indexed_value("vfd", (row*m_cols) + col, segdata); |
| 141 | |
| 142 | m_dirty[row][col] = 0; |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /* 2x40 VFD display used in the ESQ-1, VFX-SD, SD-1, and others */ |
| 149 | |
| 124 | 150 | static MACHINE_CONFIG_FRAGMENT(esq2x40) |
| 125 | 151 | MCFG_DEFAULT_LAYOUT(layout_esq2by40) |
| 126 | 152 | MACHINE_CONFIG_END |
| r15339 | r15340 | |
| 141 | 167 | { |
| 142 | 168 | switch (data) |
| 143 | 169 | { |
| 170 | case 0xd0: // blink start |
| 171 | m_curattr = AT_BLINK; |
| 172 | break; |
| 173 | |
| 174 | case 0xd1: // blink stop |
| 175 | m_curattr &= ~AT_BLINK; |
| 176 | break; |
| 177 | |
| 144 | 178 | case 0xd6: // clear screen |
| 145 | 179 | m_cursx = m_cursy = 0; |
| 146 | 180 | memset(m_chars, 0, sizeof(m_chars)); |
| r15339 | r15340 | |
| 155 | 189 | } |
| 156 | 190 | else |
| 157 | 191 | { |
| 158 | | if (data == 'f') // EPS-16 clear screen (HACK!) |
| 192 | if ((data >= 0x20) && (data <= 0x5f)) |
| 159 | 193 | { |
| 160 | | m_cursx = m_cursy = 0; |
| 161 | | memset(m_chars, 0, sizeof(m_chars)); |
| 162 | | memset(m_attrs, 0, sizeof(m_attrs)); |
| 163 | | memset(m_dirty, 1, sizeof(m_dirty)); |
| 164 | | } |
| 165 | | else if ((data >= 0x20) && (data <= 0x5f)) |
| 166 | | { |
| 167 | 194 | m_chars[m_cursy][m_cursx] = data - ' '; |
| 195 | m_attrs[m_cursy][m_cursx] = m_curattr; |
| 168 | 196 | m_dirty[m_cursy][m_cursx] = 1; |
| 169 | 197 | m_cursx++; |
| 170 | 198 | |
| r15339 | r15340 | |
| 178 | 206 | update_display(); |
| 179 | 207 | } |
| 180 | 208 | |
| 181 | | void esq2x40_t::update_display() |
| 209 | esq2x40_t::esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x40, "Ensoniq 2x40 VFD", tag, owner, clock) |
| 182 | 210 | { |
| 183 | | for (int row = 0; row < 2; row++) |
| 211 | m_rows = 2; |
| 212 | m_cols = 40; |
| 213 | } |
| 214 | |
| 215 | /* 1x22 display from the VFX (not right, but it'll do for now) */ |
| 216 | |
| 217 | static MACHINE_CONFIG_FRAGMENT(esq1x22) |
| 218 | MCFG_DEFAULT_LAYOUT(layout_esq1by22) |
| 219 | MACHINE_CONFIG_END |
| 220 | |
| 221 | machine_config_constructor esq1x22_t::device_mconfig_additions() const |
| 222 | { |
| 223 | return MACHINE_CONFIG_NAME( esq1x22 ); |
| 224 | } |
| 225 | |
| 226 | void esq1x22_t::write_char(int data) |
| 227 | { |
| 228 | if (data >= 0x60) |
| 184 | 229 | { |
| 185 | | for (int col = 0; col < 40; col++) |
| 230 | switch (data) |
| 186 | 231 | { |
| 187 | | if (m_dirty[row][col]) |
| 188 | | { |
| 189 | | UINT32 segdata = conv_segments(font[m_chars[row][col]]); |
| 232 | case 'f': // clear screen |
| 233 | m_cursx = m_cursy = 0; |
| 234 | memset(m_chars, 0, sizeof(m_chars)); |
| 235 | memset(m_attrs, 0, sizeof(m_attrs)); |
| 236 | memset(m_dirty, 1, sizeof(m_dirty)); |
| 237 | break; |
| 190 | 238 | |
| 191 | | output_set_indexed_value("vfd", (row*40) + col, segdata); |
| 239 | default: |
| 240 | printf("Unhandled control code %02x\n", data); |
| 241 | break; |
| 242 | } |
| 243 | } |
| 244 | else |
| 245 | { |
| 246 | if ((data >= 0x20) && (data <= 0x5f)) |
| 247 | { |
| 248 | m_chars[0][m_cursx] = data - ' '; |
| 249 | m_dirty[0][m_cursx] = 1; |
| 250 | m_cursx++; |
| 192 | 251 | |
| 193 | | m_dirty[row][col] = 0; |
| 252 | if (m_cursx >= 23) |
| 253 | { |
| 254 | m_cursx = 23; |
| 194 | 255 | } |
| 195 | 256 | } |
| 196 | 257 | } |
| 258 | |
| 259 | update_display(); |
| 197 | 260 | } |
| 198 | 261 | |
| 199 | | esq2x40_t::esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x40, "Ensoniq 2x40 VFD", tag, owner, clock) |
| 262 | esq1x22_t::esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ1x22, "Ensoniq 1x22 VFD", tag, owner, clock) |
| 200 | 263 | { |
| 264 | m_rows = 1; |
| 265 | m_cols = 22; |
| 201 | 266 | } |
| 202 | 267 | |
| 268 | /* SQ-1 display, I think it's really an LCD but we'll deal with it for now */ |
| 269 | machine_config_constructor esq2x40_sq1_t::device_mconfig_additions() const |
| 270 | { |
| 271 | return MACHINE_CONFIG_NAME( esq2x40 ); // we use the normal 2x40 layout |
| 272 | } |
| 203 | 273 | |
| 274 | void esq2x40_sq1_t::write_char(int data) |
| 275 | { |
| 276 | if ((data >= 0x20) && (data <= 0x5f)) |
| 277 | { |
| 278 | m_chars[m_cursy][m_cursx] = data - ' '; |
| 279 | m_attrs[m_cursy][m_cursx] = m_curattr; |
| 280 | m_dirty[m_cursy][m_cursx] = 1; |
| 281 | m_cursx++; |
| 282 | |
| 283 | if (m_cursx >= 39) |
| 284 | { |
| 285 | m_cursx = 39; |
| 286 | } |
| 287 | |
| 288 | update_display(); |
| 289 | } |
| 290 | else |
| 291 | { |
| 292 | // printf("SQ-1 unhandled display char %02x\n", data); |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | esq2x40_sq1_t::esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : esqvfd_t(mconfig, ESQ2x40_SQ1, "Ensoniq 2x40 VFD (SQ-1 variant)", tag, owner, clock) |
| 297 | { |
| 298 | m_rows = 2; |
| 299 | m_cols = 40; |
| 300 | } |
| 301 | |
src/mess/machine/esqvfd.h
| r15339 | r15340 | |
| 3 | 3 | |
| 4 | 4 | #include "emu.h" |
| 5 | 5 | |
| 6 | #define MCFG_ESQ1x22_ADD(_tag) \ |
| 7 | MCFG_DEVICE_ADD(_tag, ESQ1x22, 60) |
| 8 | |
| 9 | #define MCFG_ESQ1x22_REMOVE(_tag) \ |
| 10 | MCFG_DEVICE_REMOVE(_tag) |
| 11 | |
| 6 | 12 | #define MCFG_ESQ2x40_ADD(_tag) \ |
| 7 | 13 | MCFG_DEVICE_ADD(_tag, ESQ2x40, 60) |
| 8 | 14 | |
| 15 | #define MCFG_ESQ2x40_REMOVE(_tag) \ |
| 16 | MCFG_DEVICE_REMOVE(_tag) |
| 17 | |
| 18 | #define MCFG_ESQ2x40_SQ1_ADD(_tag) \ |
| 19 | MCFG_DEVICE_ADD(_tag, ESQ2x40_SQ1, 60) |
| 20 | |
| 21 | #define MCFG_ESQ2x40_SQ1_REMOVE(_tag) \ |
| 22 | MCFG_DEVICE_REMOVE(_tag) |
| 23 | |
| 9 | 24 | class esqvfd_t : public device_t { |
| 10 | 25 | public: |
| 11 | 26 | typedef delegate<void (bool state)> line_cb; |
| r15339 | r15340 | |
| 15 | 30 | DECLARE_WRITE8_MEMBER( write ) { write_char(data); } |
| 16 | 31 | |
| 17 | 32 | virtual void write_char(int data) = 0; |
| 18 | | virtual void update_display() = 0; |
| 33 | virtual void update_display(); |
| 19 | 34 | |
| 20 | 35 | UINT32 conv_segments(UINT16 segin); |
| 21 | 36 | |
| r15339 | r15340 | |
| 24 | 39 | static const UINT8 AT_BOLD = 0x01; |
| 25 | 40 | static const UINT8 AT_UNDERLINE = 0x02; |
| 26 | 41 | static const UINT8 AT_BLINK = 0x04; |
| 42 | static const UINT8 AT_BLINKED = 0x80; // set when character should be blinked off |
| 27 | 43 | |
| 28 | 44 | virtual void device_start(); |
| 29 | 45 | virtual void device_reset(); |
| 30 | 46 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 31 | 47 | |
| 32 | 48 | int m_cursx, m_cursy; |
| 49 | int m_rows, m_cols; |
| 50 | UINT8 m_curattr; |
| 33 | 51 | UINT8 m_chars[2][40]; |
| 34 | 52 | UINT8 m_attrs[2][40]; |
| 35 | 53 | UINT8 m_dirty[2][40]; |
| 36 | 54 | }; |
| 37 | 55 | |
| 56 | class esq1x22_t : public esqvfd_t { |
| 57 | public: |
| 58 | esq1x22_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 59 | |
| 60 | virtual void write_char(int data); |
| 61 | |
| 62 | protected: |
| 63 | virtual machine_config_constructor device_mconfig_additions() const; |
| 64 | |
| 65 | private: |
| 66 | }; |
| 67 | |
| 38 | 68 | class esq2x40_t : public esqvfd_t { |
| 39 | 69 | public: |
| 40 | 70 | esq2x40_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 41 | 71 | |
| 42 | 72 | virtual void write_char(int data); |
| 43 | | virtual void update_display(); |
| 44 | 73 | |
| 45 | 74 | protected: |
| 46 | 75 | virtual machine_config_constructor device_mconfig_additions() const; |
| r15339 | r15340 | |
| 48 | 77 | private: |
| 49 | 78 | }; |
| 50 | 79 | |
| 80 | class esq2x40_sq1_t : public esqvfd_t { |
| 81 | public: |
| 82 | esq2x40_sq1_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 83 | |
| 84 | virtual void write_char(int data); |
| 85 | |
| 86 | protected: |
| 87 | virtual machine_config_constructor device_mconfig_additions() const; |
| 88 | |
| 89 | private: |
| 90 | }; |
| 91 | |
| 92 | extern const device_type ESQ1x22; |
| 51 | 93 | extern const device_type ESQ2x40; |
| 94 | extern const device_type ESQ2x40_SQ1; |
| 52 | 95 | |
| 53 | 96 | #endif |
src/mess/layout/esq1by22.lay
| r0 | r15340 | |
| 1 | <!-- esq1by24.lay --> |
| 2 | <!-- 2012-05-27: Initial version. [R. Belmont / VFDGen 0.1] --> |
| 3 | |
| 4 | <mamelayout version="2"> |
| 5 | |
| 6 | <element name="vfd0" defstate="0"> |
| 7 | <led14segsc> |
| 8 | <color red="0.45" green="1.0" blue="0.95" /> |
| 9 | </led14segsc> |
| 10 | </element> |
| 11 | |
| 12 | <element name="background"> |
| 13 | <rect> |
| 14 | <bounds left="0" top="0" right="1" bottom="1" /> |
| 15 | <color red="0.0" green="0.0" blue="0.0" /> |
| 16 | </rect> |
| 17 | </element> |
| 18 | |
| 19 | <view name="Default Layout"> |
| 20 | |
| 21 | <!-- Background --> |
| 22 | <backdrop element="background"> |
| 23 | <bounds left="0" top="0" right="455" bottom="23" /> |
| 24 | </backdrop> |
| 25 | |
| 26 | <!-- VFDs --> |
| 27 | <bezel name="vfd0" element="vfd0"> |
| 28 | <bounds left="0" top="0" right="18" bottom="23" /> |
| 29 | </bezel> |
| 30 | <bezel name="vfd1" element="vfd0"> |
| 31 | <bounds left="19" top="0" right="37" bottom="23" /> |
| 32 | </bezel> |
| 33 | <bezel name="vfd2" element="vfd0"> |
| 34 | <bounds left="38" top="0" right="56" bottom="23" /> |
| 35 | </bezel> |
| 36 | <bezel name="vfd3" element="vfd0"> |
| 37 | <bounds left="57" top="0" right="75" bottom="23" /> |
| 38 | </bezel> |
| 39 | <bezel name="vfd4" element="vfd0"> |
| 40 | <bounds left="76" top="0" right="94" bottom="23" /> |
| 41 | </bezel> |
| 42 | <bezel name="vfd5" element="vfd0"> |
| 43 | <bounds left="95" top="0" right="113" bottom="23" /> |
| 44 | </bezel> |
| 45 | <bezel name="vfd6" element="vfd0"> |
| 46 | <bounds left="114" top="0" right="132" bottom="23" /> |
| 47 | </bezel> |
| 48 | <bezel name="vfd7" element="vfd0"> |
| 49 | <bounds left="133" top="0" right="151" bottom="23" /> |
| 50 | </bezel> |
| 51 | <bezel name="vfd8" element="vfd0"> |
| 52 | <bounds left="152" top="0" right="170" bottom="23" /> |
| 53 | </bezel> |
| 54 | <bezel name="vfd9" element="vfd0"> |
| 55 | <bounds left="171" top="0" right="189" bottom="23" /> |
| 56 | </bezel> |
| 57 | <bezel name="vfd10" element="vfd0"> |
| 58 | <bounds left="190" top="0" right="208" bottom="23" /> |
| 59 | </bezel> |
| 60 | <bezel name="vfd11" element="vfd0"> |
| 61 | <bounds left="209" top="0" right="227" bottom="23" /> |
| 62 | </bezel> |
| 63 | <bezel name="vfd12" element="vfd0"> |
| 64 | <bounds left="228" top="0" right="246" bottom="23" /> |
| 65 | </bezel> |
| 66 | <bezel name="vfd13" element="vfd0"> |
| 67 | <bounds left="247" top="0" right="265" bottom="23" /> |
| 68 | </bezel> |
| 69 | <bezel name="vfd14" element="vfd0"> |
| 70 | <bounds left="266" top="0" right="284" bottom="23" /> |
| 71 | </bezel> |
| 72 | <bezel name="vfd15" element="vfd0"> |
| 73 | <bounds left="285" top="0" right="303" bottom="23" /> |
| 74 | </bezel> |
| 75 | <bezel name="vfd16" element="vfd0"> |
| 76 | <bounds left="304" top="0" right="322" bottom="23" /> |
| 77 | </bezel> |
| 78 | <bezel name="vfd17" element="vfd0"> |
| 79 | <bounds left="323" top="0" right="341" bottom="23" /> |
| 80 | </bezel> |
| 81 | <bezel name="vfd18" element="vfd0"> |
| 82 | <bounds left="342" top="0" right="360" bottom="23" /> |
| 83 | </bezel> |
| 84 | <bezel name="vfd19" element="vfd0"> |
| 85 | <bounds left="361" top="0" right="379" bottom="23" /> |
| 86 | </bezel> |
| 87 | <bezel name="vfd20" element="vfd0"> |
| 88 | <bounds left="380" top="0" right="398" bottom="23" /> |
| 89 | </bezel> |
| 90 | <bezel name="vfd21" element="vfd0"> |
| 91 | <bounds left="399" top="0" right="417" bottom="23" /> |
| 92 | </bezel> |
| 93 | <bezel name="vfd22" element="vfd0"> |
| 94 | <bounds left="418" top="0" right="436" bottom="23" /> |
| 95 | </bezel> |
| 96 | <bezel name="vfd23" element="vfd0"> |
| 97 | <bounds left="437" top="0" right="455" bottom="23" /> |
| 98 | </bezel> |
| 99 | </view> |
| 100 | |
| 101 | </mamelayout> |
src/mess/drivers/esq5505.c
| r15339 | r15340 | |
| 12 | 12 | Memory map: |
| 13 | 13 | |
| 14 | 14 | 0x000000-0x00ffff work RAM low |
| 15 | | 0x200000-0x20001f OTTO (5505) regs |
| 15 | 0x200000-0x20001f OTTO(5505) regs |
| 16 | 16 | 0x240000-0x24003f ??? regs |
| 17 | 17 | 0x260000-0x2601ff ESP (5510) regs |
| 18 | 18 | 0x280000-0x28001f DUART (68681) regs |
| r15339 | r15340 | |
| 40 | 40 | |
| 41 | 41 | #include "machine/esqvfd.h" |
| 42 | 42 | |
| 43 | #define GENERIC (0) |
| 44 | #define EPS16 (1) |
| 45 | #define SQ1 (2) |
| 46 | |
| 43 | 47 | class esq5505_state : public driver_device |
| 44 | 48 | { |
| 45 | 49 | public: |
| r15339 | r15340 | |
| 48 | 52 | m_maincpu(*this, "maincpu"), |
| 49 | 53 | m_duart(*this, "duart"), |
| 50 | 54 | m_fdc(*this, "wd1772"), |
| 55 | m_epsvfd(*this, "epsvfd"), |
| 56 | m_sq1vfd(*this, "sq1vfd"), |
| 51 | 57 | m_vfd(*this, "vfd") |
| 52 | 58 | { } |
| 53 | 59 | |
| 54 | 60 | required_device<device_t> m_maincpu; |
| 55 | 61 | required_device<device_t> m_duart; |
| 56 | 62 | optional_device<wd1772_t> m_fdc; |
| 63 | optional_device<esq1x22_t> m_epsvfd; |
| 64 | optional_device<esq2x40_sq1_t> m_sq1vfd; |
| 57 | 65 | optional_device<esq2x40_t> m_vfd; |
| 58 | 66 | |
| 59 | 67 | virtual void machine_reset(); |
| r15339 | r15340 | |
| 63 | 71 | DECLARE_READ16_MEMBER(mc68681_r); |
| 64 | 72 | DECLARE_WRITE16_MEMBER(mc68681_w); |
| 65 | 73 | |
| 66 | | bool m_bIsEPS16; |
| 74 | int m_system_type; |
| 67 | 75 | UINT8 m_duart_io; |
| 68 | 76 | bool m_bCalibSecondByte; |
| 69 | 77 | |
| r15339 | r15340 | |
| 185 | 193 | } |
| 186 | 194 | |
| 187 | 195 | static ADDRESS_MAP_START( vfx_map, AS_PROGRAM, 16, esq5505_state ) |
| 188 | | AM_RANGE(0x000000, 0x03ffff) AM_RAM AM_SHARE("osram") |
| 196 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_MIRROR(0x30000) AM_SHARE("osram") |
| 189 | 197 | AM_RANGE(0x200000, 0x20001f) AM_DEVREADWRITE_LEGACY("ensoniq", es5505_r, es5505_w) |
| 190 | 198 | AM_RANGE(0x260000, 0x2601ff) AM_READWRITE(es5510_dsp_r, es5510_dsp_w) |
| 191 | 199 | AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8_LEGACY("duart", duart68681_r, duart68681_w, 0x00ff) |
| 192 | 200 | AM_RANGE(0xc00000, 0xc1ffff) AM_ROM AM_REGION("osrom", 0) |
| 193 | | AM_RANGE(0xfc0000, 0xffffff) AM_RAM AM_SHARE("osram") |
| 201 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("osram") |
| 194 | 202 | ADDRESS_MAP_END |
| 195 | 203 | |
| 196 | 204 | static ADDRESS_MAP_START( vfxsd_map, AS_PROGRAM, 16, esq5505_state ) |
| r15339 | r15340 | |
| 264 | 272 | { |
| 265 | 273 | esq5505_state *state = device->machine().driver_data<esq5505_state>(); |
| 266 | 274 | |
| 267 | | // printf("ch %d: [%02x]\n", channel, data); |
| 268 | | |
| 269 | 275 | if (channel == 1) |
| 270 | 276 | { |
| 271 | | state->m_vfd->write_char(data); |
| 277 | // printf("ch %d: [%02x] (PC=%x)\n", channel, data, cpu_get_pc(state->m_maincpu)); |
| 278 | switch (state->m_system_type) |
| 279 | { |
| 280 | case GENERIC: |
| 281 | state->m_vfd->write_char(data); |
| 282 | break; |
| 272 | 283 | |
| 273 | | // c023ea = Rx B on vfxsd calib at c033ba |
| 284 | case EPS16: |
| 285 | state->m_epsvfd->write_char(data); |
| 286 | break; |
| 287 | |
| 288 | case SQ1: |
| 289 | state->m_sq1vfd->write_char(data); |
| 290 | break; |
| 291 | } |
| 292 | |
| 274 | 293 | if (state->m_bCalibSecondByte) |
| 275 | 294 | { |
| 276 | | // printf("Calibrate second byte %02x\n", data); |
| 277 | | duart68681_rx_data(state->m_duart, 1, (UINT8)(FPTR)0xff); // this is the correct response for "calibration OK" |
| 295 | // printf("KPC second byte %02x\n", data); |
| 296 | if (data == 0xfd) // calibration request |
| 297 | { |
| 298 | duart68681_rx_data(state->m_duart, 1, (UINT8)(FPTR)0xff); // this is the correct response for "calibration OK" |
| 299 | } |
| 278 | 300 | state->m_bCalibSecondByte = false; |
| 279 | 301 | } |
| 280 | 302 | else if (data == 0xfb) // request calibration |
| 281 | 303 | { |
| 282 | | // printf("KPC command, waiting on second byte (PC=%x)\n", cpu_get_pc(state->m_maincpu)); |
| 283 | 304 | state->m_bCalibSecondByte = true; |
| 284 | 305 | } |
| 285 | 306 | else |
| 286 | 307 | { |
| 287 | 308 | // EPS-16+ wants a throwaway reply byte for each byte sent to the KPC |
| 288 | 309 | // VFX-SD and SD-1 definitely don't :) |
| 289 | | if (state->m_bIsEPS16) |
| 310 | if (state->m_system_type == EPS16) |
| 290 | 311 | { |
| 291 | 312 | // 0xe7 must respond with any byte that isn't 0xc8 or the ROM dies. |
| 292 | 313 | // 0x71 must respond with anything (return not checked) |
| 293 | | |
| 294 | 314 | duart68681_rx_data(state->m_duart, 1, (UINT8)(FPTR)0x00); // actual value of response is never checked |
| 295 | 315 | } |
| 296 | 316 | } |
| 297 | | |
| 298 | 317 | } |
| 299 | 318 | } |
| 300 | 319 | |
| r15339 | r15340 | |
| 318 | 337 | }; |
| 319 | 338 | |
| 320 | 339 | static MACHINE_CONFIG_START( vfx, esq5505_state ) |
| 321 | | MCFG_CPU_ADD("maincpu", M68000, 8000000) |
| 340 | MCFG_CPU_ADD("maincpu", M68000, 16000000) |
| 322 | 341 | MCFG_CPU_PROGRAM_MAP(vfx_map) |
| 323 | 342 | |
| 324 | 343 | MCFG_ESQ2x40_ADD("vfd") |
| r15339 | r15340 | |
| 332 | 351 | MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) |
| 333 | 352 | MACHINE_CONFIG_END |
| 334 | 353 | |
| 354 | static MACHINE_CONFIG_DERIVED(sq1, vfx) |
| 355 | MCFG_ESQ2x40_REMOVE("vfd") |
| 356 | MCFG_ESQ2x40_SQ1_ADD("sq1vfd") |
| 357 | MACHINE_CONFIG_END |
| 358 | |
| 335 | 359 | static MACHINE_CONFIG_DERIVED(eps16, vfx) |
| 336 | 360 | MCFG_CPU_MODIFY( "maincpu" ) |
| 337 | 361 | MCFG_CPU_PROGRAM_MAP(eps16_map) |
| 338 | 362 | |
| 363 | MCFG_ESQ2x40_REMOVE("vfd") |
| 364 | MCFG_ESQ1x22_ADD("epsvfd") |
| 365 | |
| 339 | 366 | MCFG_WD1772x_ADD("wd1772", 8000000) |
| 340 | 367 | MCFG_FLOPPY_DRIVE_ADD("fd0", ensoniq_floppies, "35dd", 0, esq5505_state::floppy_formats) |
| 341 | 368 | MACHINE_CONFIG_END |
| r15339 | r15340 | |
| 406 | 433 | ROM_LOAD16_BYTE( "eps-l.bin", 0x000000, 0x008000, CRC(382beac1) SHA1(110e31edb03fcf7bbde3e17423b21929e5b32db2) ) |
| 407 | 434 | ROM_LOAD16_BYTE( "eps-h.bin", 0x000001, 0x008000, CRC(d8747420) SHA1(460597751386eb5f08465699b61381c4acd78065) ) |
| 408 | 435 | |
| 409 | | ROM_REGION(0x200000, "waverom", ROMREGION_ERASE00) // did the EPS-16 have ROM sounds or is it a pure sampler? |
| 436 | ROM_REGION(0x200000, "waverom", ROMREGION_ERASE00) // EPS-16 has no ROM sounds |
| 410 | 437 | ROM_END |
| 411 | 438 | |
| 412 | 439 | static DRIVER_INIT(common) |
| 413 | 440 | { |
| 414 | 441 | esq5505_state *state = machine.driver_data<esq5505_state>(); |
| 415 | 442 | |
| 416 | | state->m_bIsEPS16 = false; |
| 443 | state->m_system_type = GENERIC; |
| 417 | 444 | state->m_duart_io = 0; |
| 418 | 445 | |
| 419 | 446 | floppy_connector *con = machine.device<floppy_connector>("fd0"); |
| r15339 | r15340 | |
| 430 | 457 | esq5505_state *state = machine.driver_data<esq5505_state>(); |
| 431 | 458 | |
| 432 | 459 | DRIVER_INIT_CALL(common); |
| 433 | | state->m_bIsEPS16 = true; |
| 460 | state->m_system_type = EPS16; |
| 434 | 461 | } |
| 435 | 462 | |
| 463 | static DRIVER_INIT(sq1) |
| 464 | { |
| 465 | esq5505_state *state = machine.driver_data<esq5505_state>(); |
| 466 | |
| 467 | DRIVER_INIT_CALL(common); |
| 468 | state->m_system_type = SQ1; |
| 469 | } |
| 470 | |
| 436 | 471 | CONS( 1989, vfx, 0, 0, vfx, vfx, common, "Ensoniq", "VFX", GAME_NOT_WORKING ) // 2x40 VFD |
| 437 | 472 | CONS( 1989, vfxsd, 0, 0, vfxsd, vfx, common, "Ensoniq", "VFX-SD", GAME_NOT_WORKING ) // 2x40 VFD |
| 438 | 473 | CONS( 1990, sd1, 0, 0, vfxsd, vfx, common, "Ensoniq", "SD-1", GAME_NOT_WORKING ) // 2x40 VFD |
| 439 | 474 | CONS( 1990, sd132, 0, 0, vfxsd, vfx, common, "Ensoniq", "SD-1 32", GAME_NOT_WORKING ) // 2x40 VFD |
| 440 | | CONS( 1990, sq1, 0, 0, vfx, vfx, common, "Ensoniq", "SQ-1", GAME_NOT_WORKING ) // LCD of some sort |
| 441 | | CONS( 1990, eps16, 0, 0, eps16, vfx, eps16, "Ensoniq", "EPS-16 Plus", GAME_NOT_WORKING ) // 1x40? (20? 32?) VFD |
| 475 | CONS( 1990, sq1, 0, 0, sq1, vfx, sq1, "Ensoniq", "SQ-1", GAME_NOT_WORKING ) // LCD of some sort |
| 476 | CONS( 1990, eps16, 0, 0, eps16, vfx, eps16, "Ensoniq", "EPS-16 Plus", GAME_NOT_WORKING ) // custom VFD: one alphanumeric 22-char row, one graphics-capable row (alpha row can also do bar graphs) |
| 442 | 477 | |