Correct DAC remapping responsible for wrong colors in Flight Simulator

This commit is contained in:
Jonathan Campbell 2023-04-06 15:56:25 -07:00
parent bc99b648ff
commit 2e7d4540b6
2 changed files with 5 additions and 2 deletions

View File

@ -221,7 +221,7 @@ static void write_crtc_data_other(Bitu /*port*/,Bitu val,Bitu /*iolen*/) {
case 0x1C: /* Hercules InColor */ case 0x1C: /* Hercules InColor */
if (hercCard == HERC_InColor) { if (hercCard == HERC_InColor) {
vga.herc.palette[vga.herc.palette_index] = (uint8_t)val & 63u; vga.herc.palette[vga.herc.palette_index] = (uint8_t)val & 63u;
VGA_DAC_CombineColor(vga.herc.palette_index,vga.herc.palette_index); VGA_ATTR_SetPalette(vga.herc.palette_index,vga.herc.palette_index);
if (++vga.herc.palette_index >= 0x10) vga.herc.palette_index = 0; if (++vga.herc.palette_index >= 0x10) vga.herc.palette_index = 0;
break; break;
} }

View File

@ -1065,7 +1065,10 @@ bool INT10_SetVideoMode_OTHER(uint16_t mode,bool clearmem) {
case MCH_HERC: case MCH_HERC:
IO_WriteB(0x3b8,0x28); // TEXT mode and blinking characters IO_WriteB(0x3b8,0x28); // TEXT mode and blinking characters
if (hercCard < HERC_InColor) { if (hercCard >= HERC_InColor) {
VGA_ATTR_SetEGAMonitorPalette(EGA);
}
else {
Herc_Palette(); Herc_Palette();
VGA_DAC_CombineColor(0,0); VGA_DAC_CombineColor(0,0);
} }