1
0
Fork 0

add alternative mono-palette for mode7 (hal, thanks to ripsaw for reporting this)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3253
This commit is contained in:
Sebastian Strohhäcker 2009-01-02 19:30:53 +00:00
parent 87c8c10eb6
commit c680a2b46c

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: int10_modes.cpp,v 1.82 2008-12-29 14:41:05 c2woody Exp $ */
/* $Id: int10_modes.cpp,v 1.83 2009-01-02 19:30:53 c2woody Exp $ */
#include <string.h>
@ -247,6 +247,18 @@ static Bit8u text_palette[64][3]=
};
static Bit8u mtext_palette[64][3]=
{
{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},
{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},
{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},
{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},
{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},
{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},
{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},
{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f},{0x3f,0x3f,0x3f}
};
static Bit8u mtext_s3_palette[64][3]=
{
{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},{0x00,0x00,0x00},
{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},{0x2a,0x2a,0x2a},
@ -1100,12 +1112,20 @@ att_text16:
IO_Write(0x3c8,0);
switch (CurMode->type) {
case M_EGA:
if (CurMode->mode>0xf) goto dac_text16;
else if (CurMode->mode==0xf) goto dac_mtext16;
for (i=0;i<64;i++) {
IO_Write(0x3c9,ega_palette[i][0]);
IO_Write(0x3c9,ega_palette[i][1]);
IO_Write(0x3c9,ega_palette[i][2]);
if (CurMode->mode>0xf) {
goto dac_text16;
} else if (CurMode->mode==0xf) {
for (i=0;i<64;i++) {
IO_Write(0x3c9,mtext_s3_palette[i][0]);
IO_Write(0x3c9,mtext_s3_palette[i][1]);
IO_Write(0x3c9,mtext_s3_palette[i][2]);
}
} else {
for (i=0;i<64;i++) {
IO_Write(0x3c9,ega_palette[i][0]);
IO_Write(0x3c9,ega_palette[i][1]);
IO_Write(0x3c9,ega_palette[i][2]);
}
}
break;
case M_CGA2:
@ -1119,11 +1139,18 @@ att_text16:
break;
case M_TEXT:
if (CurMode->mode==7) {
dac_mtext16:
for (i=0;i<64;i++) {
IO_Write(0x3c9,mtext_palette[i][0]);
IO_Write(0x3c9,mtext_palette[i][1]);
IO_Write(0x3c9,mtext_palette[i][2]);
if ((IS_VGA_ARCH) && (svgaCard == SVGA_S3Trio)) {
for (i=0;i<64;i++) {
IO_Write(0x3c9,mtext_s3_palette[i][0]);
IO_Write(0x3c9,mtext_s3_palette[i][1]);
IO_Write(0x3c9,mtext_s3_palette[i][2]);
}
} else {
for (i=0;i<64;i++) {
IO_Write(0x3c9,mtext_palette[i][0]);
IO_Write(0x3c9,mtext_palette[i][1]);
IO_Write(0x3c9,mtext_palette[i][2]);
}
}
break;
} //FALLTHROUGH!!!!