Previous 15994 Revisions Next

r15513 Thursday 28th June, 2012 at 19:19:50 UTC by Wilbert Pol
scv.c: Fixed sprite locations with respect to the background; changed active display settings a bit. (nw)
[src/mess/drivers]scv.c

src/mess/drivers/scv.c
r15512r15513
424424
425425INLINE void plot_sprite_part( bitmap_ind16 &bitmap, UINT8 x, UINT8 y, UINT8 pat, UINT8 col )
426426{
427   if ( x < 4 )
428   {
429      return;
430   }
431
432   x -= 4;
433
427434   if ( pat & 0x08 )
428      bitmap.pix16(y, x ) = col;
435   {
436      bitmap.pix16(y + 2, x ) = col;
437   }
429438   if ( pat & 0x04 && x < 255 )
430      bitmap.pix16(y, x + 1 ) = col;
439   {
440      bitmap.pix16(y + 2, x + 1 ) = col;
441   }
431442   if ( pat & 0x02 && x < 254 )
432      bitmap.pix16(y, x + 2 ) = col;
443   {
444      bitmap.pix16(y + 2, x + 2 ) = col;
445   }
433446   if ( pat & 0x01 && x < 253 )
434      bitmap.pix16(y, x + 3 ) = col;
447   {
448      bitmap.pix16(y + 2, x + 3 ) = col;
449   }
435450}
436451
437452
r15512r15513
565580      int text_y = 0;
566581
567582      if ( y < clip_y )
583      {
568584         text_y = ( state->m_videoram[0x1400] & 0x80 ) ? 0 : 1;
585      }
569586      else
587      {
570588         text_y = ( state->m_videoram[0x1400] & 0x80 ) ? 1 : 0;
589      }
571590
572591      for ( x = 0; x < 32; x++ )
573592      {
r15512r15513
575594         UINT8 d = state->m_videoram[ 0x1000 + y * 32 + x ];
576595
577596         if ( x < clip_x )
597         {
578598            text_x = ( state->m_videoram[0x1400] & 0x40 ) ? 0 : 1;
599         }
579600         else
601         {
580602            text_x = ( state->m_videoram[0x1400] & 0x40 ) ? 1 : 0;
603         }
581604
582605         if ( text_x && text_y )
583606         {
r15512r15513
599622               draw_semi_graph( bitmap, x * 8    , y * 16 + 12, d & 0x02, gr_fg );
600623               draw_semi_graph( bitmap, x * 8 + 4, y * 16 + 12, d & 0x01, gr_fg );
601624               break;
625
602626            case 0x03:      /* Block graphics mode */
603627               draw_block_graph( bitmap, x * 8, y * 16    , d >> 4 );
604628               draw_block_graph( bitmap, x * 8, y * 16 + 8, d & 0x0f );
605629               break;
630
606631            default:      /* Otherwise draw nothing? */
607632               break;
608633            }
r15512r15513
631656         UINT8 bottom = 1;
632657
633658         if ( !col )
659         {
634660            continue;
661         }
635662
636663         if ( !spr_y )
664         {
637665            continue;
666         }
638667
639668         if ( half )
640669         {
r15512r15513
674703            draw_sprite( state, bitmap, spr_x, spr_y, tile_idx, col, left, right, top, bottom, clip );
675704            if ( x_32 || y_32 )
676705            {
677               static const UINT8 spr_2col_lut0[16] = { 0, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1, 1 };
678               static const UINT8 spr_2col_lut1[16] = { 0, 1, 8, 11, 2, 3, 10, 9, 4, 5, 12, 13, 6, 7, 14, 15 };
706               static const UINT8 spr_2col_lut0[16] = { 0, 15, 12, 13, 10, 11,  8, 9, 6, 7,  4,  5, 2, 3,  1,  1 };
707               static const UINT8 spr_2col_lut1[16] = { 0,  1,  8, 11,  2,  3, 10, 9, 4, 5, 12, 13, 6, 7, 14, 15 };
679708
680709               draw_sprite( state, bitmap, spr_x, spr_y, tile_idx + 8 * x_32 + y_32, ( i & 0x40 ) ? spr_2col_lut1[col] : spr_2col_lut0[col], left, right, top, bottom, clip );
681710            }
r15512r15513
685714            /* regular sprite handling */
686715            draw_sprite( state, bitmap, spr_x, spr_y, tile_idx, col, left, right, top, bottom, clip );
687716            if ( x_32 )
688               draw_sprite( state, bitmap, spr_x + 16, spr_y, tile_idx + 8, col, 1, 1, top, bottom, clip );
717            {
718               draw_sprite( state, bitmap, spr_x + 16, spr_y, tile_idx | 8, col, 1, 1, top, bottom, clip );
719            }
689720
690721            if ( y_32 )
691722            {
692723               clip &= 0x07;
693               draw_sprite( state, bitmap, spr_x, spr_y + 16, tile_idx + 1, col, left, right, 1, 1, clip );
724               draw_sprite( state, bitmap, spr_x, spr_y + 16, tile_idx | 1, col, left, right, 1, 1, clip );
694725               if ( x_32 )
695                  draw_sprite( state, bitmap, spr_x + 16, spr_y + 16, tile_idx + 9, col, 1, 1, 1, 1, clip );
726               {
727                  draw_sprite( state, bitmap, spr_x + 16, spr_y + 16, tile_idx | 9, col, 1, 1, 1, 1, clip );
728               }
696729            }
697730         }
698731      }
r15512r15513
759792
760793   /* Video chip is EPOCH TV-1 */
761794   MCFG_SCREEN_ADD( "screen", RASTER )
762   MCFG_SCREEN_RAW_PARAMS( XTAL_14_31818MHz/2, 456, 17, 209, 262, 0, 240 )   /* TODO: Verify */
795   MCFG_SCREEN_RAW_PARAMS( XTAL_14_31818MHz/2, 456, 24, 24+192, 262, 23, 23+222 )   /* TODO: Verify */
763796   MCFG_SCREEN_UPDATE_STATIC( scv )
764797
765798   MCFG_GFXDECODE(scv)
r15512r15513
796829
797830   /* Video chip is EPOCH TV-1A */
798831   MCFG_SCREEN_ADD( "screen", RASTER )
799   MCFG_SCREEN_RAW_PARAMS( XTAL_13_4MHz/2, 456, 17, 209, 342, 0, 256 )      /* TODO: Verify */
832   MCFG_SCREEN_RAW_PARAMS( XTAL_13_4MHz/2, 456, 24, 24+192, 342, 23, 23+222 )      /* TODO: Verify */
800833   MCFG_SCREEN_UPDATE_STATIC( scv )
801834
802835   MCFG_GFXDECODE(scv)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team