First post, by star2doc
On both my Macintosh G4 and G5 ppc machines, if I run DOSBox in vgaonly mode, the text screen colors are distorted (white text is blueish) and 256 color mode displays the wrong colors in full screen mode.
This patch corrects both vgaonly display issues on the ppc Mac, but has not been tested on any other platforms. Among other things, this patch disables the display of 9bit wide characters. It is, in short, an ugly hack for Macs only.
--- src/hardware/vga_draw.cpp 2010-02-01 21:25:52.000000000 -0500
+++ src/hardware/vga_draw.cpp 2010-02-01 21:34:04.000000000 -0500
@@ -1229,10 +1229,11 @@
case M_VGA:
doublewidth=true;
width<<=2;
- if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
+/* if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
bpp=16;
VGA_DrawLine = VGA_Draw_Xlat16_Linear_Line;
- } else VGA_DrawLine = VGA_Draw_Linear_Line;
+ } else VGA_DrawLine = VGA_Draw_Linear_Line; */
+ VGA_DrawLine = VGA_Draw_Linear_Line;
break;
case M_LIN8:
if (vga.crtc.mode_control & 0x8)
@@ -1270,10 +1271,11 @@
doublewidth=(vga.seq.clocking_mode & 0x8) > 0;
vga.draw.blocks = width;
width<<=3;
- if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
+/* if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
bpp=16;
VGA_DrawLine = VGA_Draw_Xlat16_Linear_Line;
- } else VGA_DrawLine=VGA_Draw_Linear_Line;
+ } else VGA_DrawLine=VGA_Draw_Linear_Line; */
+ VGA_DrawLine=VGA_Draw_Linear_Line;
vga.draw.linear_base = vga.fastmem;
vga.draw.linear_mask = (vga.vmemwrap<<1) - 1;
@@ -1300,18 +1302,20 @@
aspect_ratio=1.0;
vga.draw.blocks=width;
doublewidth=(vga.seq.clocking_mode & 0x8) > 0;
- if ((IS_VGA_ARCH) && (svgaCard==SVGA_None) && !(vga.seq.clocking_mode&0x01)) {
+/* if ((IS_VGA_ARCH) && (svgaCard==SVGA_None) && !(vga.seq.clocking_mode&0x01)) {
width*=9; /* 9 bit wide text font */
- VGA_DrawLine=VGA_TEXT_Xlat16_Draw_Line_9;
+/* VGA_DrawLine=VGA_TEXT_Xlat16_Draw_Line_9;
bpp=16;
// VGA_DrawLine=VGA_TEXT_Draw_Line_9;
} else {
width<<=3; /* 8 bit wide text font */
- if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
+/* if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) {
VGA_DrawLine=VGA_TEXT_Xlat16_Draw_Line;
bpp=16;
} else VGA_DrawLine=VGA_TEXT_Draw_Line;
- }
+ } */
+ width<<=3; /* 8 bit wide text font */
+ VGA_DrawLine=VGA_TEXT_Draw_Line;
break;
case M_HERC_GFX:
aspect_ratio=1.5;