Exemplo n.º 1
0
void VGA_ATTR_SetPalette(Bit8u index,Bit8u val) {
	vga.attr.palette[index] = val;
	if (vga.attr.mode_control & 0x80) val = (val&0xf) | (vga.attr.color_select << 4);
	val &= 63;
	val |= (vga.attr.color_select & 0xc) << 4;
	if (GCC_UNLIKELY(machine==MCH_EGA)) {
		if ((vga.crtc.vertical_total | ((vga.crtc.overflow & 1) << 8)) == 260) {
			// check for intensity bit
			if (val&0x10) val|=0x38;
			else {
				val&=0x7;
				// check for special brown
				if (val==6) val=0x14;
			}
		}
	}
	VGA_DAC_CombineColor(index,val);
}
Exemplo n.º 2
0
void VGA_ATTR_SetPalette(Bit8u index,Bit8u val) {
    if (vga.attr.mode_control & 0x80) val=(val&0xf) | (vga.attr.color_select << 4);
    else val=(val & 63) | (vga.attr.color_select & 0xc) << 4;
    VGA_DAC_CombineColor(index,val);
}