1
0
Fork 0

Aspect correction fixes for CGA composite, Hercules graphics, 350-line text modes, 400-line VESA modes, and VGA ModeX (God of Thunder, Lost Vikings, Wrath of Earth, etc.)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3913
This commit is contained in:
ripsaw8080 2015-05-13 01:35:39 +00:00
parent 937dcdb1ee
commit ba3110ca07
2 changed files with 8 additions and 4 deletions

View file

@ -1310,7 +1310,9 @@ void VGA_SetupDrawing(Bitu /*val*/) {
break;
case 3: //480 line mode, filled with 525 total
default:
pheight = (480.0 / 480.0) * ( 525.0 / vtotal );
//Allow 527 total ModeX to have exact 1:1 aspect
target_total = (vga.mode==M_VGA && vtotal==527) ? 527.0 : 525.0;
pheight = (480.0 / 480.0) * ( target_total / vtotal );
break;
}
@ -1403,6 +1405,7 @@ void VGA_SetupDrawing(Bitu /*val*/) {
vga.draw.linear_mask = (vga.vmemwrap<<1) - 1;
break;
case M_CGA16:
aspect_ratio=1.2;
doubleheight=true;
vga.draw.blocks=width*2;
width<<=4;
@ -1421,7 +1424,6 @@ void VGA_SetupDrawing(Bitu /*val*/) {
VGA_DrawLine=VGA_Draw_1BPP_Line;
break;
case M_TEXT:
aspect_ratio=1.2;
vga.draw.blocks=width;
doublewidth=(vga.seq.clocking_mode & 0x8) > 0;
if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
@ -1444,9 +1446,9 @@ void VGA_SetupDrawing(Bitu /*val*/) {
}
break;
case M_HERC_GFX:
aspect_ratio=1.5;
vga.draw.blocks=width*2;
width*=16;
aspect_ratio=((double)width/(double)height)*(3.0/4.0);
VGA_DrawLine=VGA_Draw_1BPP_Line;
break;
case M_TANDY2:

View file

@ -1006,7 +1006,9 @@ bool INT10_SetVideoMode(Bit16u mode) {
if (svgaCard == SVGA_S3Trio) {
/* Setup the correct clock */
if (CurMode->mode>=0x100) {
misc_output|=0xef; //Select clock 3
if (CurMode->vdispend>480)
misc_output|=0xc0; //480-line sync
misc_output|=0x0c; //Select clock 3
Bitu clock=CurMode->vtotal*8*CurMode->htotal*70;
VGA_SetClock(3,clock/1000);
}