Previous 199869 Revisions Next

r30670 Monday 26th May, 2014 at 03:29:47 UTC by Carl
dwarfd: adjust colors with playing cards as reference (nw)
[src/mame/drivers]dwarfd.c

trunk/src/mame/drivers/dwarfd.c
r30669r30670
581581   for(i=0;i<8;i+=2)
582582   {
583583      UINT8 pixel = (pixels >> (i * 2)) & 0xf;
584      bitmap.pix32(y, x + i) = palette[pixel & 0xe];
585      bitmap.pix32(y, x + i + 1) = palette[(pixel & 1) ? 0 : (pixel & 0xe)];
584      UINT8 value = (pixel >> 1) | (rvv << 3) | (vsp << 4);
585      bitmap.pix32(y, x + i) = palette[value];
586      bitmap.pix32(y, x + i + 1) = palette[(pixel & 1) ? 0 : value];
586587   }
587588}
588589
r30669r30670
596597   //if(!linecount)
597598   //   logerror("%d %d %02x %02x %02x %02x %02x %02x %02x\n", x/8, y/8, charcode, lineattr, lten, rvv, vsp, gpa, hlgt);
598599
599   if(vsp)
600      pixels ^= 0xeeee; // FIXME: What is this really supposed to do?
601
602600   for(i=0;i<8;i+=2)
603601   {
604602      UINT8 pixel = (pixels >> (i * 2)) & 0xf;
605      bitmap.pix32(y, x + i) = palette[pixel & 0xe];
606      bitmap.pix32(y, x + i + 1) = palette[(pixel & 1) ? 0 : (pixel & 0xe)];
603      UINT8 value = (pixel >> 1) | (rvv << 3) | (vsp << 4);
604      bitmap.pix32(y, x + i) = palette[value];
605      bitmap.pix32(y, x + i + 1) = palette[(pixel & 1) ? 0 : value];
607606   }
608607}
609608
r30669r30670
722721{
723722   int i;
724723
725   for (i = 0; i < 256; i++)
724   for (i = 0; i < 32; i++)
726725   {
727726      int r = machine().rand()|0x80;
728727      int g = machine().rand()|0x80;
729728      int b = machine().rand()|0x80;
730      if (i == 0) r = g = b = 0;
731
732729      palette.set_pen_color(i,rgb_t(r,g,b));
733730   }
734   palette.set_pen_color(8, rgb_t(255, 255, 0));
735   palette.set_pen_color(12, rgb_t(127, 127, 255));
736   palette.set_pen_color(4, rgb_t(0, 255, 0));
737   palette.set_pen_color(6, rgb_t(255, 0, 0));
731   palette.set_pen_color(0, rgb_t(0, 0, 0));
732   palette.set_pen_color(1, rgb_t(255, 0, 0));
733   palette.set_pen_color(2, rgb_t(0, 255, 0));
734   palette.set_pen_color(3, rgb_t(255, 0, 0));
735   palette.set_pen_color(4, rgb_t(255, 255, 0));
736   palette.set_pen_color(6, rgb_t(255, 255, 255));
737   palette.set_pen_color(7, rgb_t(0, 0, 0));
738   palette.set_pen_color(8, rgb_t(0, 0, 0));
739   palette.set_pen_color(9, rgb_t(0, 0, 0));
740   palette.set_pen_color(12, rgb_t(255, 255, 0));
741   palette.set_pen_color(14, rgb_t(255, 255, 255));
742   palette.set_pen_color(16, rgb_t(0, 0, 0));
743   palette.set_pen_color(20, rgb_t(0, 0, 255));
738744}
739745
740746void dwarfd_state::machine_start()
r30669r30670
770776   MCFG_I8275_DRQ_CALLBACK(WRITELINE(dwarfd_state, drq_w))
771777
772778   MCFG_GFXDECODE_ADD("gfxdecode", "palette", dwarfd)
773   MCFG_PALETTE_ADD("palette", 0x100)
779   MCFG_PALETTE_ADD("palette", 32)
774780   MCFG_PALETTE_INIT_OWNER(dwarfd_state, dwarfd)
775781
776782   MCFG_SPEAKER_STANDARD_MONO("mono")
r30669r30670
9991005   {
10001006      if (src[i] & 0x10)
10011007      {
1002         src[i] = src[i] & 0xe0;
1008         src[i] = (src[i] & 0xe0) >> 1;
10031009   //      src[i] |= ((src[(i + 1) & 0x7fff] & 0xe0) >> 4);
10041010
10051011      }
10061012      else
10071013      {
1008         src[i] = src[i] & 0xe0;
1014         src[i] = (src[i] & 0xe0) >> 1;
10091015         src[i] |= (src[i] >> 4);
10101016
10111017      }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team