From 05f6c5bf9bcbafafa1630232033c452e7441cf0c Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 11 Jan 2004 09:27:52 +0000 Subject: [PATCH] Fix set VESA set CPU window function to only use a bye value Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1558 --- src/ints/int10.cpp | 6 +++++- src/ints/int10.h | 2 +- src/ints/int10_vesa.cpp | 9 ++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ints/int10.cpp b/src/ints/int10.cpp index 37c9da26..6bcc2302 100644 --- a/src/ints/int10.cpp +++ b/src/ints/int10.cpp @@ -330,7 +330,7 @@ graphics_chars: break; case 0x05: if (reg_bh==0) { /* Set CPU Window */ - reg_ah=VESA_SetCPUWindow(reg_bl,reg_dx); + reg_ah=VESA_SetCPUWindow(reg_bl,reg_dl); reg_al=0x4f; } else if (reg_bh == 1) { /* Get CPU Window */ reg_ah=VESA_GetCPUWindow(reg_bl,reg_dx); @@ -340,6 +340,10 @@ graphics_chars: reg_ah=0x01; } break; + case 0x06: + reg_al=0x4f; + reg_ah=VESA_ScanLineLength(reg_al,reg_bx,reg_cx,reg_dx); + break; case 0x07: switch (reg_bl) { case 0x80: /* Set Display Start during retrace ?? */ diff --git a/src/ints/int10.h b/src/ints/int10.h index ac114d25..6b544fe2 100644 --- a/src/ints/int10.h +++ b/src/ints/int10.h @@ -182,7 +182,7 @@ Bit8u VESA_GetSVGAInformation(Bit16u seg,Bit16u off); Bit8u VESA_GetSVGAModeInformation(Bit16u mode,Bit16u seg,Bit16u off); Bit8u VESA_SetSVGAMode(Bit16u mode); Bit8u VESA_GetSVGAMode(Bit16u & mode); -Bit8u VESA_SetCPUWindow(Bit8u window,Bit16u address); +Bit8u VESA_SetCPUWindow(Bit8u window,Bit8u address); Bit8u VESA_GetCPUWindow(Bit8u window,Bit16u & address); Bit8u VESA_ScanLineLength(Bit8u subcall,Bit16u & bytes,Bit16u & pixels,Bit16u & lines); Bit8u VESA_SetDisplayStart(Bit16u x,Bit16u y); diff --git a/src/ints/int10_vesa.cpp b/src/ints/int10_vesa.cpp index 621bc34d..358c4e2b 100644 --- a/src/ints/int10_vesa.cpp +++ b/src/ints/int10_vesa.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: int10_vesa.cpp,v 1.6 2004-01-07 20:26:38 qbix79 Exp $ */ +/* $Id: int10_vesa.cpp,v 1.7 2004-01-11 09:27:52 harekiet Exp $ */ #include #include @@ -170,7 +170,7 @@ Bit8u VESA_GetSVGAMode(Bit16u & mode) { return 0x00; } -Bit8u VESA_SetCPUWindow(Bit8u window,Bit16u address) { +Bit8u VESA_SetCPUWindow(Bit8u window,Bit8u address) { if (window) return 0x1; if ((address<32)) { IO_Write(0x3d4,0x6a); @@ -295,12 +295,8 @@ Bit8u VESA_GetDisplayStart(Bit16u & x,Bit16u & y) { return 0x1; } return 0x00; - - } - - static Bitu SetWindowPositionHandler(void) { if (reg_bh) reg_ah=VESA_GetCPUWindow(reg_bl,reg_dx); else reg_ah=VESA_SetCPUWindow(reg_bl,reg_dx); @@ -308,7 +304,6 @@ static Bitu SetWindowPositionHandler(void) { return 0; } - void INT10_SetupVESA(void) { /* Put the mode list somewhere in memory */ Bitu i;