Previous 199869 Revisions Next

r21433 Monday 25th February, 2013 at 01:43:15 UTC by David Haywood
improve tyres + brake lights (alt palette during decode - a form palette compression for cycling palettes while only storing partial palettes)
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21432r21433
710710         else /* 8bpp */ \
711711         { \
712712            /* mm cccc cccc */ \
713            tempshape[data_written^writeaddrxor] = rearranged_16bit_gfx[color_offs + (compdata & 0x0ff) + 0x48]; /* +0x48 crt test end of blue, start of white */ \
713            UINT16 rawdat = (compdata & 0x0ff); \
714            if (rawdat > (b2altpenmask + 0x48)) /* does this have to be turned on by b1mode? does it affect the other colour depths too? */ \
715               tempshape[data_written^writeaddrxor] = rearranged_16bit_gfx[color_offs2 + (rawdat )+0x48]; /* bike wheels + brake light */ \
716            else \
717               tempshape[data_written^writeaddrxor] = rearranged_16bit_gfx[color_offs + (rawdat )+0x48]; /* +0x48 crt test end of blue, start of white */ \
714718            if (tempshape[data_written^writeaddrxor]==0x8000) blankcount--; \
715719            data_written++; \
716720         } \
r21432r21433
866870
867871   if (blit1_unused!=0) printf("blit1 unknown bits set %08x\n", object->spriteblit[1]);
868872
873
874   if (b1mode)
875   {
876   //   b1colorNumber = object->state->machine().rand()&0xfff;
877   }
878
869879   /************* object->spriteblit[3] *************/
870880
871881   // seems to be more complex than just transparency
872882   UINT32 blit2_unused = object->spriteblit[2]&0xff80f800;
873   UINT32 b2tpen = (object->spriteblit[2] & 0x007f0000)>>16;
883   UINT32 b2altpenmask = (object->spriteblit[2] & 0x007f0000)>>16;
874884   UINT32 b2colorNumber = (object->spriteblit[2] & 0x000007ff);
875885
876886   if (b2colorNumber != b1colorNumber)
r21432r21433
888898   if (blit2_unused!=0) printf("blit1 unknown bits set %08x\n", object->spriteblit[2]);
889899   if (b1mode)
890900   {
891      if (b2tpen != 0x7f) printf("b1mode 1, b2tpen!=0x7f\n");
901      if (b2altpenmask != 0x7f) printf("b1mode 1, b2altpenmask!=0x7f\n");
892902   }
893903   else
894904   {
895905      // 0x01/0x02 trips in rare cases (start of one of the attract levels) maybe this is some kind of alpha instead?
896      if ((b2tpen != 0x00) && (b2tpen != 0x01) && (b2tpen != 0x02)) printf("b1mode 0, b2tpen!=0x00,0x01 or 0x02 (is %02x)\n", b2tpen);
906      if ((b2altpenmask != 0x00) && (b2altpenmask != 0x01) && (b2altpenmask != 0x02)) printf("b1mode 0, b2altpenmask!=0x00,0x01 or 0x02 (is %02x)\n", b2altpenmask);
897907   }
898908    // 00??0uuu
899909    // ?? seems to be 00 or 7f, set depending on b1mode
r21432r21433
15221532         UINT16 tempshape[16*16];
15231533
15241534         int color_offs = (0x7b20 + (b1colorNumber & 0x7ff))*0x40 * 5; /* yes, * 5 */
1535         int color_offs2 = (0x7b20 + (b2colorNumber & 0x7ff))*0x40 * 5;
15251536         UINT16 blankcount = 256;
15261537
15271538         if (used_flipy)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team