Revision 4c8732d7 hw/cirrus_vga.c
b/hw/cirrus_vga.c | ||
---|---|---|
136 | 136 |
|
137 | 137 |
// control 0x33 |
138 | 138 |
#define CIRRUS_BLTMODEEXT_SOLIDFILL 0x04 |
139 |
#define CIRRUS_BLTMODEEXT_COLOREXPINV 0x02 |
|
139 | 140 |
#define CIRRUS_BLTMODEEXT_DWORDGRANULARITY 0x01 |
140 | 141 |
|
141 | 142 |
// memory-mapped IO |
... | ... | |
325 | 326 |
#include "cirrus_vga_rop.h" |
326 | 327 |
|
327 | 328 |
#define ROP_NAME 1 |
328 |
#define ROP_OP(d, s) d = 0xff
|
|
329 |
#define ROP_OP(d, s) d = ~0
|
|
329 | 330 |
#include "cirrus_vga_rop.h" |
330 | 331 |
|
331 | 332 |
#define ROP_NAME notsrc_and_dst |
... | ... | |
435 | 436 |
ROP2(cirrus_colorexpand_transp_notsrc_and_notdst), |
436 | 437 |
}; |
437 | 438 |
|
439 |
static const cirrus_bitblt_rop_t cirrus_colorexpand_transp_inv[16][4] = { |
|
440 |
ROP2(cirrus_colorexpand_transp_inv_0), |
|
441 |
ROP2(cirrus_colorexpand_transp_inv_src_and_dst), |
|
442 |
ROP_NOP2(cirrus_bitblt_rop_nop), |
|
443 |
ROP2(cirrus_colorexpand_transp_inv_src_and_notdst), |
|
444 |
ROP2(cirrus_colorexpand_transp_inv_notdst), |
|
445 |
ROP2(cirrus_colorexpand_transp_inv_src), |
|
446 |
ROP2(cirrus_colorexpand_transp_inv_1), |
|
447 |
ROP2(cirrus_colorexpand_transp_inv_notsrc_and_dst), |
|
448 |
ROP2(cirrus_colorexpand_transp_inv_src_xor_dst), |
|
449 |
ROP2(cirrus_colorexpand_transp_inv_src_or_dst), |
|
450 |
ROP2(cirrus_colorexpand_transp_inv_notsrc_or_notdst), |
|
451 |
ROP2(cirrus_colorexpand_transp_inv_src_notxor_dst), |
|
452 |
ROP2(cirrus_colorexpand_transp_inv_src_or_notdst), |
|
453 |
ROP2(cirrus_colorexpand_transp_inv_notsrc), |
|
454 |
ROP2(cirrus_colorexpand_transp_inv_notsrc_or_dst), |
|
455 |
ROP2(cirrus_colorexpand_transp_inv_notsrc_and_notdst), |
|
456 |
}; |
|
457 |
|
|
438 | 458 |
static const cirrus_bitblt_rop_t cirrus_colorexpand[16][4] = { |
439 | 459 |
ROP2(cirrus_colorexpand_0), |
440 | 460 |
ROP2(cirrus_colorexpand_src_and_dst), |
... | ... | |
820 | 840 |
CIRRUS_BLTMODE_COLOREXPAND) { |
821 | 841 |
|
822 | 842 |
if (s->cirrus_blt_mode & CIRRUS_BLTMODE_TRANSPARENTCOMP) { |
823 |
cirrus_bitblt_fgcol(s); |
|
824 |
s->cirrus_rop = cirrus_colorexpand_transp[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; |
|
843 |
if (s->cirrus_blt_modeext & CIRRUS_BLTMODEEXT_COLOREXPINV) { |
|
844 |
cirrus_bitblt_bgcol(s); |
|
845 |
s->cirrus_rop = cirrus_colorexpand_transp_inv[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; |
|
846 |
} else { |
|
847 |
cirrus_bitblt_fgcol(s); |
|
848 |
s->cirrus_rop = cirrus_colorexpand_transp[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; |
|
849 |
} |
|
825 | 850 |
} else { |
826 | 851 |
cirrus_bitblt_fgcol(s); |
827 | 852 |
cirrus_bitblt_bgcol(s); |
Also available in: Unified diff