Previous 15994 Revisions Next

r15344 Monday 28th May, 2012 at 22:20:35 UTC by R. Belmont
Slightly better handling of the SQ-1's unique display commands (nw)
[src/mess/machine]esqvfd.c

src/mess/machine/esqvfd.c
r15343r15344
7878    0x0226, // 0000 0010 0010 0110 ].
7979    0x0810, // 0000 1000 0001 0000 ^.
8080    0x0200, // 0000 0010 0000 0000 _
81    0x0040, // 0000 0000 0100 0000 `
82   0xE027, // 1110 0000 0010 0111 A.
83   0x462E, // 0100 0110 0010 1110 B.
84   0x2205, // 0010 0010 0000 0101 C.
85   0x062E, // 0000 0110 0010 1110 D.
86   0xA205, // 1010 0010 0000 0101 E.
87   0xA005, // 1010 0000 0000 0101 F.
88   0x6225, // 0110 0010 0010 0101 G.
89   0xE023, // 1110 0000 0010 0011 H.
90   0x060C, // 0000 0110 0000 1100 I.
91   0x2222, // 0010 0010 0010 0010 J.
92   0xA881, // 1010 1000 1000 0001 K.
93   0x2201, // 0010 0010 0000 0001 L.
94   0x20E3, // 0010 0000 1110 0011 M.
95   0x2863, // 0010 1000 0110 0011 N.
96   0x2227, // 0010 0010 0010 0111 O.
97   0xE007, // 1110 0000 0000 0111 P.
98   0x2A27, // 0010 1010 0010 0111 Q.
99   0xE807, // 1110 1000 0000 0111 R.
100   0xC225, // 1100 0010 0010 0101 S.
101   0x040C, // 0000 0100 0000 1100 T.
102   0x2223, // 0010 0010 0010 0011 U.
103   0x2091, // 0010 0000 1001 0001 V.
104   0x2833, // 0010 1000 0011 0011 W.
105   0x08D0, // 0000 1000 1101 0000 X.
106   0x04C0, // 0000 0100 1100 0000 Y.
107   0x0294, // 0000 0010 1001 0100 Z.
108   0x2205, // 0010 0010 0000 0101 [.
109    0x0408, // 0000 0100 0000 1000 |
110   0x0226, // 0000 0010 0010 0110 ].
111   0x0810, // 0000 1000 0001 0000 ~.
112    0x0000, // 0000 0000 0000 0000 (DEL)
81113};
82114
83115esqvfd_t::esqvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
r15343r15344
273305
274306void esq2x40_sq1_t::write_char(int data)
275307{
276    if ((data >= 0x20) && (data <= 0x5f))
308    if (m_Wait87Shift)
277309    {
310//        printf("87Shift got %02x\n", data);
311        if (data == 0x00)   // clear
312        {
313            m_cursx = m_cursy = 0;
314            memset(m_chars, 0, sizeof(m_chars));
315            memset(m_attrs, 0, sizeof(m_attrs));
316            memset(m_dirty, 1, sizeof(m_dirty));
317        }
318
319        m_Wait87Shift = false;
320    }
321    else if ((data >= 0x20) && (data <= 0x7f))
322    {
278323        m_chars[m_cursy][m_cursx] = data - ' ';
279324        m_attrs[m_cursy][m_cursx] = m_curattr;
280325        m_dirty[m_cursy][m_cursx] = 1;
r15343r15344
287332
288333        update_display();
289334    }
335    else if (data == 0x83)
336    {
337        m_cursx = m_cursy = 0;
338        memset(m_chars, 0, sizeof(m_chars));
339        memset(m_attrs, 0, sizeof(m_attrs));
340        memset(m_dirty, 1, sizeof(m_dirty));
341    }
342    else if (data == 0x87)
343    {
344        m_Wait87Shift = true;
345    }
290346    else
291347    {
292348//        printf("SQ-1 unhandled display char %02x\n", data);
r15343r15344
297353{
298354    m_rows = 2;
299355    m_cols = 40;
356    m_Wait87Shift = false;
300357}
301358

Previous 15994 Revisions Next


© 1998-2018 The MESS Team