First post, by x86++
Where the S3 emulation is active at 16-bit color, DOSBox displays 512x384 mode at double width. To correct this, made this workaround:
--- vga_draw.cpp 2016-02-14 18:19:20 -0500
+++ vga_draw-512H.cpp 2016-02-14 18:10:54 -0500
@@ -1386,7 +1386,7 @@ void VGA_SetupDrawing(Bitu /*val*/) {
// 15/16 bpp modes double the horizontal values
width<<=2;
if ((vga.crtc.mode_control & 0x8) || (svgaCard == SVGA_S3Trio && (vga.s3.pll.cmd & 0x10)))
- doublewidth = true;
+ doublewidth = false;
/* Use HW mouse cursor drawer if enabled */
VGA_ActivateHardwareCursor();
break;
However, this change only "fixes" 512H while the other <640H 16bpp modes are halved in width. For a temporary solution, it should be possible to read the vga register which stores the resolution and check it in the above if...then statement.