Previous 199869 Revisions Next

r19147 Monday 26th November, 2012 at 03:40:13 UTC by R. Belmont
(MESS) esqvfd: fake underline until we redo the character matrix (nw)
[src/mess/drivers]esq1.c
[src/mess/machine]esqvfd.c esqvfd.h

trunk/src/mess/machine/esqvfd.c
r19146r19147
169169            {
170170                UINT32 segdata = conv_segments(font[m_chars[row][col]]);
171171
172            // force bottom bar on all underlined chars
173            if (m_attrs[row][col] & AT_UNDERLINE)
174            {
175               segdata |= 0x0008;
176            }
177
172178                output_set_indexed_value("vfd", (row*m_cols) + col, segdata);
173179
174180                m_dirty[row][col] = 0;
r19146r19147
190196
191197void esq2x40_t::write_char(int data)
192198{
199   // ESQ-1 sends (cursor move) 0xfa 0xYY to mark YY characters as underlined at the current cursor location
200   if (m_lastchar == 0xfa)
201   {
202      for (int i = 0; i < data; i++)
203      {
204         m_attrs[m_cursy][m_cursx + i] |= AT_UNDERLINE;
205         m_dirty[m_cursy][m_cursx + i] = 1;
206      }
207
208      m_lastchar = 0;
209      update_display();
210      return;
211   }
212
213   m_lastchar = data;
214
193215    if ((data >= 0x80) && (data < 0xd0))
194216    {
195217        m_cursy = ((data & 0x7f) >= 40) ? 1 : 0;
r19146r19147
203225                m_curattr = AT_BLINK;
204226                break;
205227
206            case 0xd1:  // blink stop
207                m_curattr &= ~AT_BLINK;
228            case 0xd1:  // blink stop (cancel all attribs on VFX+)
229                m_curattr = 0; //&= ~AT_BLINK;
208230                break;
209231
232         case 0xd3:   // start underline
233            m_curattr |= AT_UNDERLINE;
234            break;
235
210236            case 0xd6:  // clear screen
211237                m_cursx = m_cursy = 0;
212238                memset(m_chars, 0, sizeof(m_chars));
r19146r19147
355381    m_cols = 40;
356382    m_Wait87Shift = false;
357383}
358
trunk/src/mess/machine/esqvfd.h
r19146r19147
4848    int m_cursx, m_cursy;
4949    int m_rows, m_cols;
5050    UINT8 m_curattr;
51   UINT8 m_lastchar;
5152    UINT8 m_chars[2][40];
5253    UINT8 m_attrs[2][40];
5354    UINT8 m_dirty[2][40];
trunk/src/mess/drivers/esq1.c
r19146r19147
162162
163163static UINT8 esq1_adc_read(device_t *device)
164164{
165   return 0x80;
165   return 0x00;
166166}
167167
168168void esq1_state::machine_reset()
r19146r19147
282282
283283   if (channel == 1)
284284    {
285        #if 0
286        if (data >= 0x20 && data <= 0x7f)
287        {
288            printf("%c", data);
289        }
290        else
291        {
292            printf("[%02x]", data);
293        }
294        #endif
295
285      #if 0
286      if ((data >= 0x20) && (data < 0x80))
287      {
288         printf("%c", data);
289      }
290      else
291      {
292         printf("[%02x]", data);
293      }
294      #endif
296295        state->m_vfd->write_char(data);
297296    }
298297}
r19146r19147
391390   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)          PORT_CHAR('2') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x91)
392391   PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)          PORT_CHAR('3') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x92)
393392   PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)          PORT_CHAR('4') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x93)
394   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5)          PORT_CHAR('5') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x94)
395   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6)          PORT_CHAR('6') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x95)
396   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)          PORT_CHAR('7') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x96)
397   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)          PORT_CHAR('8') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x97)
398   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9)          PORT_CHAR('9') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x98)
399   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)          PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x99)
393   PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5)          PORT_CHAR('5') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x99)
394   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6)          PORT_CHAR('6') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x94)
395   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)          PORT_CHAR('7') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x95)
396   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)          PORT_CHAR('8') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x96)
397   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9)          PORT_CHAR('9') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x97)
398   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)          PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, esq1_state, key_stroke, 0x98)
400399    #endif
401400INPUT_PORTS_END
402401

Previous 199869 Revisions Next


© 1997-2024 The MAME Team