Previous 15994 Revisions Next

r5333 Saturday 1st August, 2009 at 11:56:26 UTC by Barry Rodewald
[X68000] Made text layer treat black as transparent, and to only display colour 0 if the text layer is at priority level 2
[src/mess/video]x68k.c

src/mess/video/x68k.c
r5332r5333
794794            + (((x68k_tvram[loc+0x10000] >> bit) & 0x01) ? 2 : 0)
795795            + (((x68k_tvram[loc+0x20000] >> bit) & 0x01) ? 4 : 0)
796796            + (((x68k_tvram[loc+0x30000] >> bit) & 0x01) ? 8 : 0);
797         //if(palette_get_color(machine,0x100 + colour) != 0xff000000)  // any colour but black
798         if(colour != 0)
799            *BITMAP_ADDR16(bitmap,line,pixel) = 512 + (x68k_sys.video.text_pal[colour] >> 1);
797         if(x68k_sys.video.text_pal[colour] != 0x0000)  // any colour but black
798         {
799            // Colour 0 is displayable if the text layer is at the priority level 2
800            if(colour == 0 && (x68k_sys.video.reg[1] & 0x0c00) == 0x0800)
801               *BITMAP_ADDR16(bitmap,line,pixel) = 512 + (x68k_sys.video.text_pal[colour] >> 1);
802            else
803               if(colour != 0)
804                  *BITMAP_ADDR16(bitmap,line,pixel) = 512 + (x68k_sys.video.text_pal[colour] >> 1);
805         }
800806         bit--;
801807         if(bit < 0)
802808         {
r5332r5333
10891095//   rect.max_y=x68k_sys.crtc.height;
10901096   bitmap_fill(bitmap,cliprect,0);
10911097
1098   if(x68k_sys.sysport.contrast == 0)  // if monitor contrast is 0, then don't bother displaying anything
1099      return 0;
1100
10921101   rect.min_x=x68k_sys.crtc.hbegin;
10931102   rect.min_y=x68k_sys.crtc.vbegin;
10941103//   rect.max_x=rect.min_x + x68k_sys.crtc.visible_width-1;
r5332r5333
12111220//   popmessage("Layer enable - 0x%02x",x68k_sys.video.reg[2] & 0xff);
12121221//   popmessage("Graphic layer scroll - %i, %i - %i, %i - %i, %i - %i, %i",
12131222//      x68k_sys.crtc.reg[12],x68k_sys.crtc.reg[13],x68k_sys.crtc.reg[14],x68k_sys.crtc.reg[15],x68k_sys.crtc.reg[16],x68k_sys.crtc.reg[17],x68k_sys.crtc.reg[18],x68k_sys.crtc.reg[19]);
1214//   popmessage("Video Controller registers - %04x - %04x - %04x",x68k_sys.video.reg[0],x68k_sys.video.reg[1],x68k_sys.video.reg[2]);
12151223//   popmessage("IOC IRQ status - %02x",x68k_sys.ioc.irqstatus);
12161224//   popmessage("RAM: mouse data - %02x %02x %02x %02x",mess_ram[0x931],mess_ram[0x930],mess_ram[0x933],mess_ram[0x932]);
12171225#endif

Previous 15994 Revisions Next


© 1998-2018 The MESS Team