1
0
Fork 0

Add patch #265 to correct parameters and clock rate for some EGA modes. Also apply the yellow->brown fix to EGA text modes as well.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4061
This commit is contained in:
ripsaw8080 2017-10-28 19:48:26 +00:00
parent 9857a92c58
commit e24b034d20

View file

@ -230,12 +230,12 @@ VideoModeBlock ModeList_EGA[]={
{ 0x003 ,M_TEXT ,640 ,350 ,80 ,25 ,8 ,14 ,8 ,0xB8000 ,0x1000 ,96 ,366 ,80 ,350 ,0 },
{ 0x004 ,M_CGA4 ,320 ,200 ,40 ,25 ,8 ,8 ,1 ,0xB8000 ,0x4000 ,60 ,262 ,40 ,200 ,_EGA_HALF_CLOCK | _EGA_LINE_DOUBLE},
{ 0x005 ,M_CGA4 ,320 ,200 ,40 ,25 ,8 ,8 ,1 ,0xB8000 ,0x4000 ,60 ,262 ,40 ,200 ,_EGA_HALF_CLOCK | _EGA_LINE_DOUBLE},
{ 0x006 ,M_CGA2 ,640 ,200 ,80 ,25 ,8 ,8 ,1 ,0xB8000 ,0x4000 ,120 ,262 ,80 ,200 ,_EGA_LINE_DOUBLE},
{ 0x007 ,M_TEXT ,720 ,350 ,80 ,25 ,9 ,14 ,8 ,0xB0000 ,0x1000 ,120 ,440 ,80 ,350 ,0 },
{ 0x006 ,M_CGA2 ,640 ,200 ,80 ,25 ,8 ,8 ,1 ,0xB8000 ,0x4000 ,117 ,262 ,80 ,200 ,_EGA_LINE_DOUBLE},
{ 0x007 ,M_TEXT ,720 ,350 ,80 ,25 ,9 ,14 ,8 ,0xB0000 ,0x1000 ,101 ,370 ,80 ,350 ,0 },
{ 0x00D ,M_EGA ,320 ,200 ,40 ,25 ,8 ,8 ,8 ,0xA0000 ,0x2000 ,60 ,262 ,40 ,200 ,_EGA_HALF_CLOCK | _EGA_LINE_DOUBLE },
{ 0x00E ,M_EGA ,640 ,200 ,80 ,25 ,8 ,8 ,4 ,0xA0000 ,0x4000 ,120 ,262 ,80 ,200 ,_EGA_LINE_DOUBLE },
{ 0x00F ,M_EGA ,640 ,350 ,80 ,25 ,8 ,14 ,2 ,0xA0000 ,0x8000 ,96 ,366 ,80 ,350 ,0 },/*was EGA_2*/
{ 0x00E ,M_EGA ,640 ,200 ,80 ,25 ,8 ,8 ,4 ,0xA0000 ,0x4000 ,117 ,262 ,80 ,200 ,_EGA_LINE_DOUBLE },
{ 0x00F ,M_EGA ,640 ,350 ,80 ,25 ,8 ,14 ,2 ,0xA0000 ,0x8000 ,101 ,370 ,80 ,350 ,0 },/*was EGA_2*/
{ 0x010 ,M_EGA ,640 ,350 ,80 ,25 ,8 ,14 ,2 ,0xA0000 ,0x8000 ,96 ,366 ,80 ,350 ,0 },
{0xFFFF ,M_ERROR ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0x00000 ,0x0000 ,0 ,0 ,0 ,0 ,0 },
@ -769,9 +769,12 @@ bool INT10_SetVideoMode(Bit16u mode) {
/* Setup MISC Output Register */
Bit8u misc_output=0x2 | (mono_mode ? 0x0 : 0x1);
if ((CurMode->type==M_TEXT) && (CurMode->cwidth==9)) {
// 28MHz (16MHz EGA) clock for 9-pixel wide chars
misc_output|=0x4;
if (machine==MCH_EGA) {
// 16MHz clock for 350-line EGA modes except mode F
if ((CurMode->vdispend==350) && (mode!=0xf)) misc_output|=0x4;
} else {
// 28MHz clock for 9-pixel wide chars
if ((CurMode->type==M_TEXT) && (CurMode->cwidth==9)) misc_output|=0x4;
}
switch (CurMode->vdispend) {
@ -1194,7 +1197,7 @@ att_text16:
att_data[ct]=ct;
att_data[ct+8]=ct+0x38;
}
if (IS_VGA_ARCH) att_data[0x06]=0x14; //Odd Color 6 yellow/brown.
if (IS_EGAVGA_ARCH) att_data[0x06]=0x14; //Odd Color 6 yellow/brown.
}
break;
case M_CGA2: