Previous 199869 Revisions Next

r44688 Sunday 24th January, 2016 at 21:47:05 UTC by Jean-François DEL NERO
Cursor support.
[src/devices/video]ef9364.cpp ef9364.h

trunk/src/devices/video/ef9364.cpp
r253199r253200
125125
126126    m_screen_out.allocate( bitplane_xres, m_screen->height() );
127127
128    cursor_cnt = 0;
129    cursor_state = 0;
130
128131    save_item(NAME(m_border));
129132
130133    save_item(NAME(m_screen_out));
r253199r253200
199202        {
200203            for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ )
201204            {
202                c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
205                if( ( ( x >> 3 ) != x_curs_pos )   ||  ( r != y_curs_pos ) || !cursor_state)
206                {
207                    c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
203208
204                if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
205                    m_screen_out.pix32((r*12)+y, x) = palette[1];
209                    if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
210                        m_screen_out.pix32((r*12)+y, x) = palette[1];
211                    else
212                        m_screen_out.pix32((r*12)+y, x) = palette[0];
213                }
206214                else
207                    m_screen_out.pix32((r*12)+y, x) = palette[0];
215                {
216                    if(y != 7)
217                        m_screen_out.pix32((r*12)+y, x) = palette[0];
218                    else
219                        m_screen_out.pix32((r*12)+y, x) = palette[1];
220                }
208221            }
209222        }
210223    }
211224
225    cursor_cnt = (cursor_cnt + 1) % 13;
226    if(!cursor_cnt)
227        cursor_state ^= 1;
228
212229    copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect);
213230    return 0;
214231}
r253199r253200
240257
241258    switch( cmd&7 )
242259    {
243        case 0x0: // Page Erase ² Cursor hiom
260        case 0x0: // Page Erase & Cursor home
244261            for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ )
245262            {
246263                for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
r253199r253200
313330                x_curs_pos=0;
314331                y_curs_pos++;
315332                if( y_curs_pos >= EF9364_NB_OF_ROWS )
333                {
334                    // Scroll
335                    for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
336                    {
337                        for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
338                        {
339                            m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i ,  m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
340                        }
341                    }
342                    // Erase last line
343                    for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
344                    {
345                        m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
346                    }
347
316348                    y_curs_pos = EF9364_NB_OF_ROWS - 1;
349                }
317350            }
318351        break;
319352
trunk/src/devices/video/ef9364.h
r253199r253200
8989    int   bitplane_xres;
9090    int   bitplane_yres;
9191    int   vsync_scanline_pos;
92    int   cursor_cnt;
93    int   cursor_state;
9294
9395    UINT32 clock_freq;
9496    bitmap_rgb32 m_screen_out;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team