Previous 199869 Revisions Next

r33930 Tuesday 16th December, 2014 at 22:13:52 UTC by Alex W. Jackson
k053936.c: fix potential out-of-bounds memory access; remove some dead code [Alex Jackson]
[src/mame/video]k053936.c konamigx.c

trunk/src/mame/video/k053936.c
r242441r242442
496496
497497   if (blend > 0)
498498   {
499      dst_base += dst_pitch;      // draw blended
499      dst_ptr += dst_pitch;      // draw blended
500500      starty += incyy;
501501      startx += incyx;
502502
r242441r242442
539539   }
540540   else    //  draw solid
541541   {
542      if (blend == 0)
543      {
544         dst_ptr += dst_pitch;
545         starty += incyy;
546         startx += incyx;
547      }
548      else
549      {
550         if ((sy & 1) ^ (blend & 1))
551         {
552            if (ty <= 1) return;
542      dst_ptr += dst_pitch;
543      starty += incyy;
544      startx += incyx;
553545
554            dst_ptr += dst_pitch;
555            cy += incyy;
556            cx += incyx;
557         }
558
559         if (ty > 1)
560         {
561            ty >>= 1;
562            dst_pitch <<= 1;
563            incyy <<= 1;
564            incyx <<= 1;
565
566            dst_ptr += dst_pitch;
567            starty = cy + incyy;
568            startx = cx + incyx;
569         }
570      }
571
572546      do {
573547         do {
574548            int srcx = (cx >> 16) & 0x1fff;
trunk/src/mame/video/konamigx.c
r242441r242442
695695   int i = code<<1;
696696   int j = mixerflags>>i & 3;
697697   int k = 0;
698   static int parity = 0;
699   parity ^= 1;
700698
701699   int disp = m_k055555->K055555_read_register(K55_INPUT_ENABLES);
702700   if ((disp & K55_INP_SUB1) || (rushingheroes_hack))
r242441r242442
717715         alpha = temp4 = m_k054338->set_alpha_level(temp2);
718716
719717         if (temp4 <= 0) return;
720         if (temp4 < 255) k = (j == GXMIX_BLEND_FAST) ? ~parity : 1;
718         if (temp4 < 255) k = 1;
721719      }
722720
723721      int l = sub1flags & 0xf;
r242441r242442
745743   int temp1,temp2,temp3,temp4;
746744   int i = code<<1;
747745   int j = mixerflags>>i & 3;
748//  int k = 0;
749//  static int parity = 0;
750//  parity ^= 1;
751746
752747   int disp = m_k055555->K055555_read_register(K55_INPUT_ENABLES);
753748   if (disp & K55_INP_SUB2)
r242441r242442
768763         temp4 = m_k054338->set_alpha_level(temp2);
769764
770765         if (temp4 <= 0) return;
771         //if (temp4 < 255) k = (j == GXMIX_BLEND_FAST) ? ~parity : 1;
766         //if (temp4 < 255) k = 1;
772767      }
773768
774769      int l = sub2flags & 0xf;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team