1
0
Fork 0

fix some custom hicolor s3 modes' width settings (hal)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3065
This commit is contained in:
Sebastian Strohhäcker 2007-12-19 21:12:22 +00:00
parent 8e932280a1
commit b9a73a548c
2 changed files with 15 additions and 8 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: vga_draw.cpp,v 1.89 2007-12-10 22:11:13 c2woody Exp $ */
/* $Id: vga_draw.cpp,v 1.90 2007-12-19 21:12:22 c2woody Exp $ */
#include <string.h>
#include <math.h>
@ -1156,14 +1156,18 @@ void VGA_SetupDrawing(Bitu val) {
}
// fall-through
case M_LIN32:
width<<=1;
// fall-through
case M_LIN15:
width<<=3;
if (vga.crtc.mode_control & 0x8)
doublewidth = true;
/* Use HW mouse cursor drawer if enabled */
VGA_ActivateHardwareCursor();
break;
case M_LIN15:
case M_LIN16:
// 15/16 bpp modes double the horizontal values
width<<=2;
if (vga.crtc.mode_control & 0x8)
doublewidth = true;
if ((vga.crtc.mode_control & 0x8) || (vga.s3.pll.cmd & 0x10))
doublewidth = true;
/* Use HW mouse cursor drawer if enabled */
VGA_ActivateHardwareCursor();
break;

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: int10_modes.cpp,v 1.71 2007-12-10 22:11:13 c2woody Exp $ */
/* $Id: int10_modes.cpp,v 1.72 2007-12-19 21:12:22 c2woody Exp $ */
#include <string.h>
@ -1088,6 +1088,9 @@ dac_text16:
IO_Write(crtc_base,0x52); // extended BIOS scratchpad
IO_Write(crtc_base+1,0x80);
IO_Write(0x3c4,0x15);
IO_Write(0x3c5,0x03);
// Accellerator setup
Bitu reg_50=0;
switch (CurMode->type) {
@ -1131,7 +1134,7 @@ dac_text16:
reg_31 = 9;
break;
default:
reg_31 = 0;
reg_31 = 5;
break;
}
IO_Write(crtc_base,0x3a);IO_Write(crtc_base+1,reg_3a);