From e8d765b62559e99e48b7165154cab83eb5b043c1 Mon Sep 17 00:00:00 2001 From: Ralf Grillenberger Date: Sun, 4 Apr 2010 18:58:41 +0000 Subject: [PATCH] Add workaround for INT10 text output in ET4000 800x600x4bpp SVGA mode (Gateway 2) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3570 --- src/ints/int10_char.cpp | 13 +++++++++++++ src/ints/int10_put_pixel.cpp | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/src/ints/int10_char.cpp b/src/ints/int10_char.cpp index a3f7764a..672c0bf9 100644 --- a/src/ints/int10_char.cpp +++ b/src/ints/int10_char.cpp @@ -236,6 +236,13 @@ void INT10_ScrollWindow(Bit8u rul,Bit8u cul,Bit8u rlr,Bit8u clr,Bit8s nlines,Bit EGA16_CopyRow(cul,clr,start,start+nlines,base);break; case M_VGA: VGA_CopyRow(cul,clr,start,start+nlines,base);break; + case M_LIN4: + if ((machine==MCH_VGA) && (svgaCard==SVGA_TsengET4K) && + (CurMode->swidth<=800)) { + // the ET4000 BIOS supports text output in 800x600 SVGA + EGA16_CopyRow(cul,clr,start,start+nlines,base);break; + } + // fall-through default: LOG(LOG_INT10,LOG_ERROR)("Unhandled mode %d for scroll",CurMode->type); } @@ -262,6 +269,12 @@ filling: EGA16_FillRow(cul,clr,start,base,attr);break; case M_VGA: VGA_FillRow(cul,clr,start,base,attr);break; + case M_LIN4: + if ((machine==MCH_VGA) && (svgaCard==SVGA_TsengET4K) && + (CurMode->swidth<=800)) { + EGA16_FillRow(cul,clr,start,base,attr);break; + } + // fall-through default: LOG(LOG_INT10,LOG_ERROR)("Unhandled mode %d for scroll",CurMode->type); } diff --git a/src/ints/int10_put_pixel.cpp b/src/ints/int10_put_pixel.cpp index 63e08681..0adc4dab 100644 --- a/src/ints/int10_put_pixel.cpp +++ b/src/ints/int10_put_pixel.cpp @@ -94,6 +94,13 @@ void INT10_PutPixel(Bit16u x,Bit16u y,Bit8u page,Bit8u color) { real_writeb(0xb800,off,old); } break; + case M_LIN4: + if ((machine!=MCH_VGA) || (svgaCard!=SVGA_TsengET4K) || + (CurMode->swidth>800)) { + // the ET4000 BIOS supports text output in 800x600 SVGA (Gateway 2) + // putpixel warining? + break; + } case M_EGA: { /* Set the correct bitmask for the pixel position */