Previous 15994 Revisions Next

r2123 Thursday 27th March, 2008 at 20:10:17 UTC by Wilbert Pol
[T1000] Implemented a special TGA video mode. Fixes bug #1130.
[src/mess/video]pc_t1t.c

src/mess/video/pc_t1t.c
r2122r2123
233233}
234234
235235
236static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row ) {
237   UINT16   *p = BITMAP_ADDR16(bitmap, y, 0);
238   UINT8   *vid = pcjr.displayram + ( ra << 13 );
239   int i;
240
241   if ( y == 0 ) logerror("t1000_gfx_2bpp_tga_update_row\n");
242   for ( i = 0; i < x_count; i++ ) {
243      UINT16 offset = ( ( ma + i ) << 1 ) & 0x1fff;
244      UINT8 data = vid[ offset ];
245      UINT16 data2 = ( vid[ offset + 1 ] ) << 1;
246       
247      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x100 ) | ( data & 0x80 ) ) >> 7 ) ]; p++;
248      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x80 ) | ( data & 0x40 ) ) >> 6 ) ]; p++;
249      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x40 ) | ( data & 0x20 ) ) >> 5 ) ]; p++;
250      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x20 ) | ( data & 0x10 ) ) >> 4 ) ]; p++;
251
252      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x10 ) | ( data & 0x08 ) ) >> 3 ) ]; p++;
253      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x08 ) | ( data & 0x04 ) ) >> 2 ) ]; p++;
254      *p = pcjr.reg.data[ 0x10 + ( ( ( data2 & 0x04 ) | ( data & 0x02 ) ) >> 1 ) ]; p++;
255      *p = pcjr.reg.data[ 0x10 + (   ( data2 & 0x02 ) | ( data & 0x01 )        ) ]; p++;
256   }
257}
258
259
236260static MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row ) {
237261   UINT16  *p = BITMAP_ADDR16(bitmap, y, 0);
238262   UINT8   *vid = pcjr.displayram + ( ra << 13 );
r2122r2123
326350      case 0x80:
327351      case 0xc0:
328352         //logerror("t1t_gfx_2bpp - 2\n");
329         pcjr.update_row = t1000_gfx_2bpp_update_row;
353         pcjr.update_row = t1000_gfx_2bpp_tga_update_row;
330354         break;
331355      }
332356      break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team